Ejemplo n.º 1
0
    public void RestartGame()
    {
        boardObject.ClearBoard();

        ourTimer.StopTimer();
        theirTimer.StopTimer();

        ourTimer.OverrideTimer(15 * 60);
        theirTimer.OverrideTimer(15 * 60);

        restartButton.SetActive(false);
        forfeitButton.SetActive(false);
        passButton.SetActive(false);

        scoreText.text = "";
        wonState.text  = "";

        turnsText.text = "";

        for (int i = 0; i < inputMainMenu.Length; i++)
        {
            inputMainMenu[i].text = "";
        }

        warningMessge.text = "";

        for (int i = 0; i < dropdownMainMenu.Length; i++)
        {
            dropdownMainMenu[i].value = 0;
        }

        mainMenu.SetActive(true);

        humanVsAI         = false;
        humanInputEnabled = false;

        initialCount = 0;

        lastMoveI = 0;
        lastMoveJ = 0;

        playerColor = 'b';
        serverColor = 'w';

        ip   = "";
        port = "";

        boardObject.enabled = false;

        initialBoardOptionsDropDown.value = 0;
    }