Beispiel #1
0
    public GameState()
    {
        this.playerPieceInfo =
            new UIConstants.Components[] {
            UIConstants.Components.bluePiece,
            UIConstants.Components.redPiece
        };

        this.matrixInfoByPlayer =
            new BoardConstants.CellStatus[] {
            BoardConstants.CellStatus.bluePiece,
            BoardConstants.CellStatus.redPiece
        };

        this.winningInfoByPlayer =
            new BoardConstants.GameStatus[] {
            BoardConstants.GameStatus.bluePiece,
            BoardConstants.GameStatus.redPiece
        };

        this.gameStatus = BoardConstants.GameStatus.gameRunning;
        this.gameOver   = false;
    }
Beispiel #2
0
 public void winningMovePlayed()
 {
     gameStatus = winningInfoByPlayer [currentPlayer];
     gameOver   = true;
 }
Beispiel #3
0
 public void gameDraw()
 {
     gameStatus = BoardConstants.GameStatus.draw;
 }