Exemplo n.º 1
0
    private ChessBoardSim SimulateBoard(ChessPiece piece, int[] newPositionCoords)
    {
        ChessBoardSim simBoard = new ChessBoardSim(ChessPieces.GetBoardLayout(), turnNumber);

        simBoard.MovePiece(piece, newPositionCoords[0], newPositionCoords[1], true);
        return(simBoard);
    }
Exemplo n.º 2
0
    private bool ValidateKingIsSafeOnSquare(int[] square)
    {
        bool          isSafe;
        ChessBoardSim simBoard = SimulateBoard(GetAlliedKing(), square);

        isSafe = simBoard.checkIfKingIsChecked();
        return(isSafe);
    }
Exemplo n.º 3
0
    private ChessBoardSim SimulateBoard(ChessPiece piece, int[] newPositionCoords)
    {
        ChessBoardSim simBoard = new ChessBoardSim((ChessPiece[, ])boardLayout.Clone(), turnNumber);

        simBoard.MovePiece(piece, newPositionCoords[0], newPositionCoords[1], true);
        Debug.Log(whitePiecesRemaining.Count + " " + blackPiecesRemaining.Count);
        Debug.Log(simBoard.whitePiecesRemaining.Count + " " + simBoard.blackPiecesRemaining.Count);
        return(simBoard);
    }
Exemplo n.º 4
0
 private void Start()
 {
     chessBoard      = this.gameObject;
     ChessPieces     = new ChessBoardSim(new ChessPiece[8, 8], turnNumber);
     MovementOptions = new bool[8, 8];
     DrawChessBoard();
     PopulateBoard();
     InstantiateSelectionBox();
     CreateAudioSource();
     //SetUpUI();
     StartTurn();
 }