Start of GameBits
[naja.git] / naja / widgets / game_bits.py
1 """
2 Widget that holds the games's bits.
3 """
4
5 import pygame
6
7 from naja.constants import BIT_SIZE, BITS
8 from naja.widgets.base import Widget
9
10
11 class GameBitsWidget(Widget):
12     """
13     Widget which holds the game's bits.
14     """
15     def __init__(self, pos, state):
16         super(GameBitsWidget, self).__init__(pos, BIT_SIZE)
17         self.state = state
18
19     def prepare(self):
20         self.surface = pygame.Surface(BIT_SIZE)
21
22     def draw(self, surface):
23         surface.blit(self.surface, self.pos)