示例#1
0
        private void askToContinueAndActInAccordance()
        {
            string toContinueAnswer;

            toContinueAnswer = getValidAnswerFromThePlayer();

            if (toContinueAnswer.Equals(k_No.ToString()))
            {
                m_GameOver = true;
            }
            else
            {
                m_OtheloGameManager.GamePanel.ClearBoard();
                m_OtheloGameManager.InitializeGame();
                clearScreenAndPrintGamePanel();
            }
        }
示例#2
0
        private void initializeOtheloGame()
        {
            string player1Name       = getValidNameFromUser(k_Player1);
            string player2Name       = null;
            bool   isAgainstComputer = false;

            byte      boardSize = getValidBoardSizeFromUser();
            eGameMode gameMode  = getValidGameMode();

            if (gameMode == eGameMode.AgainstComputer)
            {
                player2Name       = k_ComputerName;
                isAgainstComputer = true;
            }
            else
            {
                player2Name = getValidNameFromUser(k_Player2);
            }

            m_OtheloGameManager = new OtheloGameManager(boardSize, player1Name, player2Name, isAgainstComputer);
            m_OtheloGameManager.InitializeGame();
        }