This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from OpenGL.GL import * | |
from array import array | |
glEnableClientState(GL_VERTEX_ARRAY) | |
class Primitive(): | |
def __init__(self,vert,colors,colors2,drawMode,ind,x=0,y=0,z=0,s=0,rX=0,rY=0,rZ=0,sX=1,sY=1,sZ=1): | |
#Csúcstömbadatok tárolása/Storing vertex-data | |
self.vert=array('f',list(vert)) | |
self.vert=glGenBuffers(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Low-level terminal API based on colorama | |
Uses ASCII escape sequences | |
""" | |
import colorama | |
from colorama.ansi import clear_screen, set_title | |
from shutil import get_terminal_size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rpg; | |
import java.util.ArrayList; | |
class Terminal | |
{ | |
public static final Integer BLACK = 0; | |
public static final Integer RED = 1; | |
public static final Integer GREEN = 2; | |
public static final Integer YELLOW = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_multiple(v1,v2): | |
"""Test if the 1st vec is the multiple of the 2nd""" | |
try: | |
v=[a/b for a,b in zip(v1,v2) if (not (a==0 and b==0))] #Divide one-by-one, but when dividing 0 by 0, don't do anything(and don1T raise ZDE) | |
#print(v) | |
return(len(set(v))<=1) #If there are 0 or 1 types of values(empty list or all the same) then it's true, else it's not | |
except ZeroDivisionError: #If divide nonzero by zero | |
return False #Then it's not a multiple of it | |
NewerOlder