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,
'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)