Lars Yencken  committed 9cc5d4e

Made locations easier to debug interactively.

  • Participants
  • Parent commits 771c7b1
  • Branches anton

Comments (0)

Files changed (1)

           'e': 'w',
           'w': 'e'}
-def setup_loc(ants):
+def setup_loc(rows, cols):
     "Initialise the loc class with dimensions."
-    rows = ants.rows
-    cols = ants.cols
     def _loc_add(l1, l2):
         return Loc((l1.y + l2.y) % rows, (l1.x + l2.x) % cols)
  = [[LAND for col in range(self.cols)]
                     for row in range(self.rows)]
-        setup_loc(self)
+        setup_loc(self.rows, self.cols)
     def update(self, data):
         'parse engine input and update the game state'