예제 #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;
    }
예제 #2
0
 public void winningMovePlayed()
 {
     gameStatus = winningInfoByPlayer [currentPlayer];
     gameOver   = true;
 }
예제 #3
0
 public void gameDraw()
 {
     gameStatus = BoardConstants.GameStatus.draw;
 }