X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fgamestate.py;h=a82cec8e6f5de9f9229f63a950b4c12d5d9acb65;hb=e85dd79c4d2100eb11ac8d55833b63ee8f736b9d;hp=96e55056bf862b5243aed0198bd46e8a0ce097a7;hpb=62a297a628fe85160afa770ecad666e3d1a50126;p=naja.git diff --git a/naja/gamestate.py b/naja/gamestate.py index 96e5505..a82cec8 100644 --- a/naja/gamestate.py +++ b/naja/gamestate.py @@ -2,9 +2,7 @@ The current game state. """ -from .constants import BITS -from .gameboard import GameBoard -from .player import Player +from naja.gameboard import GameBoard class GameState(object): @@ -12,14 +10,10 @@ class GameState(object): Naja game state. """ - INITIAL_BITS = ( - BITS.NORTH | BITS.SOUTH | - BITS.EAST | BITS.WEST - ) - MAX_HEALTH = 4 - WINS_REQUIRED = 4 - def __init__(self): - self.player = Player(self.INITIAL_BITS, (0, 0)) - self.gameboard = GameBoard( - self.player, self.MAX_HEALTH, self.WINS_REQUIRED) + self.gameboard = GameBoard.new_game( + locations_definition=[{'actions': []}]) # TODO: we will need some of these :) + + @property + def player(self): + return self.gameboard.player