Skip to content

Commit

Permalink
Debug save.
Browse files Browse the repository at this point in the history
  • Loading branch information
skytreader committed Mar 9, 2018
1 parent 6d21ee7 commit 10caf39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions algorithms/grids/grid_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Grid(GameModel):
def __init__(self, grid_size):
super(Grid, self).__init__()
self.qg = QuadraticGrid(
grid_size[0], grid_size[1], diag_neighbors=False,
border_properties=BorderProperties()
grid_size[0], grid_size[1], diag_neighbors=False
)
for i in range(grid_size[0]):
for j in range(grid_size[1]):
Expand All @@ -23,8 +22,11 @@ def toggle(self, row, col):
def render(self, **kwargs):
row = kwargs["row"]
col = kwargs["col"]
print "Asked to render %s, %s" % (row, col)
import random

if self.qg.grid[row][col]:
#if self.qg.grid[row][col]:
if random.choice((True, False)):
return GridScreen.UNTAKEN
else:
return GridScreen.BLOCKED

0 comments on commit 10caf39

Please sign in to comment.