Esempio n. 1
0
 def __init__(self, bounds):
     self.bounds_x = bounds[0]
     self.bounds_y = bounds[1]
     self.grid_x = bounds[0]/10
     self.grid_y = bounds[1]/10
     self.grid = [ [0 for i in range(self.grid_y)] \
                   for j in range(self.grid_x) ]
     self.current_block = block.generate_block(50, 10)
Esempio n. 2
0
 def new_block(self):
     self.current_block = block.generate_block(50, 10)
     for x,y in self.current_block.grid_cor():
         if self.grid[x][y] == 1:
             print "you lose"
             sys.exit(0)