X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fgameboard.py;h=5728d5d0f28535abfeadcbb5ab3f98c3a24b74b7;hb=06a414a1c7d82e530665d4e5e69d45aadd7e1d7f;hp=5ec61507c7e31a5b10b7c28780b427414e97c462;hpb=a7257f7008fb5e2a8203c996dd2545b737228594;p=naja.git diff --git a/naja/gameboard.py b/naja/gameboard.py index 5ec6150..5728d5d 100644 --- a/naja/gameboard.py +++ b/naja/gameboard.py @@ -1,6 +1,7 @@ from random import choice -from naja.constants import BITS, DIRECTION_BITS, CONDITION_BITS +from naja.constants import( + BITS, DIRECTION_BITS, CONDITION_BITS, PLAYER_DEFAULTS) from naja.player import Player from naja import actions @@ -20,8 +21,11 @@ class GameBoard(object): self.board_locations = board_locations @classmethod - def new_game(cls, initial_bits, initial_pos, max_health, wins_required, - locations_definition): + def new_game(cls, locations_definition, + initial_bits=PLAYER_DEFAULTS.INITIAL_BITS, + initial_pos=PLAYER_DEFAULTS.INITIAL_POS, + max_health=PLAYER_DEFAULTS.MAX_HEALTH, + wins_required=PLAYER_DEFAULTS.WINS_REQUIRED): state = { 'max_health': max_health, 'health': max_health,