Make action.GLYPHS a function, action.get_glyphs.
[naja.git] / naja / widgets / tile.py
index 8ccb99db2671c5efdde8f0ba1de4dd7926cfdbb7..e925674b44aae8b3440a73044c5969eefcc1b747 100644 (file)
@@ -94,7 +94,7 @@ class TileWidget(Widget):
         self.surface.blit(img, (TILE_SIZE[0] - 20, 0))
 
     def _prepare_lock(self, action, y_offset):
-        if not action.required_bits:
+        if action.required_bits not in BIT_MAP:
             return 4
 
         img_name = BIT_MAP[action.required_bits]
@@ -117,7 +117,7 @@ class TileWidget(Widget):
     def _prepare_action(self, action, y_offset):
         x_offset = self._prepare_lock(action, y_offset)
         if self.board_pos != self.state.player.position:
-            for glyph in action.GLYPHS:
+            for glyph in action.get_glyphs():
                 img = resources.get_image(glyph, transforms=(EIGHT_BIT,))
                 self.surface.blit(img, (x_offset, y_offset + 4))
                 x_offset += img.get_width()