예제 #1
0
    public void StartGame()
    {
        if (MoveHistory != null)
        {
            MoveHistory.Clear();
        }
        else
        {
            MoveHistory = new List <Move>();
        }
        turn           = 1;
        IsGameRunning  = true;
        IsInputEnabled = true;
        board.BuildBoard(BoardSize);

        if (IsBotGame)
        {
            botManager.StartGame();
        }
        if (IsTutorialGame)
        {
            turn = 0;
            SwitchTurns(Opponent);
            RematchFlag = false;
        }
        else if (RematchFlag)
        {
            // Loser goes first in rematch
            turn = 0;
            SwitchTurns(ActivePlayer);
            RematchFlag = false;
        }
        HUD.ShowCurrentTurn();
    }