Skip to content

Instantly share code, notes, and snippets.

@Yolwoocle
Last active March 2, 2021 16:56
Show Gist options
  • Save Yolwoocle/2bb7ba7b117d4d73ab9deb082472c676 to your computer and use it in GitHub Desktop.
Save Yolwoocle/2bb7ba7b117d4d73ab9deb082472c676 to your computer and use it in GitHub Desktop.
main
from math import *
from math import *
from kandinsky import *
from ion import *
from grid import *
keys = (
# Left - Right - Up - Down
{"left": KEY_LEFT, "right": KEY_RIGHT, "up": KEY_UP, "down": KEY_DOWN},
{"left": KEY_MULTIPLICATION, "right": KEY_DIVISION, "up": KEY_RIGHTPARENTHESIS, "down": KEY_LEFTPARENTHESIS}
)
from math import *
from kandinsky import *
class Grid:
def __init__(self):
self.grid = [[0]*9]*9
def printgrid(self):
for i in range(9):
for j in range(9):
fill_rect(i*11,j*11,10,10,(50,50,50))
def place(self, x, y, sym):
self.grid[y][x] = sym
def read(self, x, y):
return self.grid[y][x]
from math import *
from kandinsky import *
class Grid:
def __init__(self):
self.grid = [[0]*9]*9
def printgrid(self):
for i in range(9):
for j in range(9):
fill_rect(i*11,j*11,10,10,(50,50,50))
def place(self, x, y, sym):
self.grid[y][x] = sym
def read(self, x, y):
return self.grid[y][x]
from math import *
from kandinsky import *
from ion import *
from tixtaxgrid import *
keys = (
# Left - Right - Up - Down
{"left": KEY_LEFT, "right": KEY_RIGHT, "up": KEY_UP, "down": KEY_DOWN},
{"left": KEY_MULTIPLICATION, "right": KEY_DIVISION, "up": KEY_RIGHTPARENTHESIS, "down": KEY_LEFTPARENTHESIS}
)
print("Hello World!")
grid = Grid()
grid.printgrid()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment