Esempio n. 1
0
    private void PlacePiece(CursorController cursorController, GameController gameController, Player player)
    {
        cursorController.SetCursorStatus(CursorStatus.EMPTY);
        this.SetGridSpaceStatus(player.playerRole);

        gameController.SetGridSpaceUnavailableColor(cursorController.getPreviousLocation());
        gameController.SetGridSpaceUnavailableColor(cursorController.getPreviousLocation() - 7);
        gameController.SetGridSpaceUnavailableColor(cursorController.getPreviousLocation() - 9);
        gameController.SetGridSpaceUnavailableColor(cursorController.getPreviousLocation() + 7);
        gameController.SetGridSpaceUnavailableColor(cursorController.getPreviousLocation() + 9);

        if (this.gridSpaceNumber != cursorController.getPreviousLocation())
        {
            gameController.AITurn();
        }
    }