private void initializeGameLogic(bool i_NewGame = true)
        {
            if (i_NewGame)
            {
                string[]           playerNames = { r_GameSettings.Player1, r_GameSettings.Player2 };
                GameMode.eGameMode gameMode    = getGameMode();

                m_CheckersLogic                = new CheckersLogic();
                m_CheckersLogic.KingSet       += gameLogic_KingSet;
                m_CheckersLogic.PlayerMoveSet += checkersLogic_PlayerMoveSet;
                m_CheckersLogic.TurnChanged   += gameLogic_TurnChanged;
                m_CheckersLogic.GameOver      += checkersLogic_GameOver;
                m_CheckersLogic.InitNewGame(gameMode, r_GameSettings.BoardSize, playerNames);
            }
            else
            {
                m_CheckersLogic.InitNewGame();
            }
        }
Example #2
0
 //  CSS-013 (-3) Input parameters names should start with i_PascaleCase.
 private void startNewGame(GameMode.eGameMode?o_GameMode = null, int i_BoardSize = 0, string[] i_PlayersNames = null)
 {
     m_PlayerQuit = false;
     m_GameLogic.InitNewGame(o_GameMode, i_BoardSize, i_PlayersNames);
     playCheckers();
 }