projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start of GameBits
[naja.git]
/
naja
/
widgets
/
game_bits.py
diff --git
a/naja/widgets/game_bits.py
b/naja/widgets/game_bits.py
index 682d520531a366790727212ac3786dc2c35d46da..21756586bf80276ea1ea28f072c81b252c22e81c 100644
(file)
--- a/
naja/widgets/game_bits.py
+++ b/
naja/widgets/game_bits.py
@@
-2,7
+2,9
@@
Widget that holds the games's bits.
"""
Widget that holds the games's bits.
"""
-from naja.constants import BIT_SIZE
+import pygame
+
+from naja.constants import BIT_SIZE, BITS
from naja.widgets.base import Widget
from naja.widgets.base import Widget
@@
-10,12
+12,12
@@
class GameBitsWidget(Widget):
"""
Widget which holds the game's bits.
"""
"""
Widget which holds the game's bits.
"""
- def __init__(self, pos,
image=Non
e):
+ def __init__(self, pos,
stat
e):
super(GameBitsWidget, self).__init__(pos, BIT_SIZE)
super(GameBitsWidget, self).__init__(pos, BIT_SIZE)
+ self.state = state
def prepare(self):
def prepare(self):
- pass
+ self.surface = pygame.Surface(BIT_SIZE)
def draw(self, surface):
def draw(self, surface):
- pass
- #surface.blit(self.surface, self.pos)
+ surface.blit(self.surface, self.pos)