X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fgamestate.py;h=4e892f883ef4cf7ab456a871cda2a13f37c5ca7b;hb=7ffa20720668ad9e8701d0b5f98a2e3161132423;hp=96e55056bf862b5243aed0198bd46e8a0ce097a7;hpb=62a297a628fe85160afa770ecad666e3d1a50126;p=naja.git diff --git a/naja/gamestate.py b/naja/gamestate.py index 96e5505..4e892f8 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=[]) # TODO: we will need some of these :) + + @property + def player(self): + return self.gameboard.player