projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix gamestate setup.
[naja.git]
/
naja
/
gameboard.py
diff --git
a/naja/gameboard.py
b/naja/gameboard.py
index 123f3be6d6bf059187f4ac97357f306e613cf625..5ec61507c7e31a5b10b7c28780b427414e97c462 100644
(file)
--- a/
naja/gameboard.py
+++ b/
naja/gameboard.py
@@
-20,7
+20,8
@@
class GameBoard(object):
self.board_locations = board_locations
@classmethod
self.board_locations = board_locations
@classmethod
- def new_game(cls, max_health, wins_required, locations_definition):
+ def new_game(cls, initial_bits, initial_pos, max_health, wins_required,
+ locations_definition):
state = {
'max_health': max_health,
'health': max_health,
state = {
'max_health': max_health,
'health': max_health,
@@
-28,7
+29,7
@@
class GameBoard(object):
'wins': 0,
'locations': locations_definition,
}
'wins': 0,
'locations': locations_definition,
}
- player = Player(
0x0f, (2, 2)
)
+ player = Player(
initial_bits, initial_pos
)
board_locations = cls.generate_board(locations_definition)
return cls(state, player, board_locations)
board_locations = cls.generate_board(locations_definition)
return cls(state, player, board_locations)