Explain Widget methods
[naja.git] / naja / gamestate.py
index 9dca03026f773869e126e71647358dbfdba354d1..4e892f883ef4cf7ab456a871cda2a13f37c5ca7b 100644 (file)
@@ -2,9 +2,7 @@
 The current game state.
 """
 
-from .constants import NORTH, SOUTH, EAST, WEST
-from .gameboard import GameBoard
-from .player import Player
+from naja.gameboard import GameBoard
 
 
 class GameState(object):
@@ -12,11 +10,10 @@ class GameState(object):
     Naja game state.
     """
 
-    INITIAL_BITS = NORTH | SOUTH | EAST | 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