-from naja.constants import TILE_SIZE
-from naja.widgets.base import Widget
-from naja.resources import resources
-
# These will probably need to go away when we have images
import pygame
import pygame.locals as pgl
+from naja.constants import TILE_SIZE
+from naja.resources import resources
+from naja.widgets.base import Widget
+
class TileWidget(Widget):
"""Widget which holds a tile on the game board."""
def prepare(self):
# Placeholder logic - just draw the outline of a square
- self.surface = pygame.surface.Surface(self.size)
+ self.surface = pygame.surface.Surface(TILE_SIZE)
pygame.draw.lines(self.surface, pgl.color.THECOLORS['yellow'],
True, [(1, 1), (1, 95), (95, 95), (95, 1)], 2)
self.surface.convert_alpha(pygame.display.get_surface())