Esempio n. 1
0
        public OthelloGameLogic(int i_BoardSize, string i_PlayerOneName, bool i_IsPlayerOneIsComputer, string i_IsPlayerTwoName, bool i_IsPlayerTwoIsComputer)
        {
            r_BoardLength         = i_BoardSize;
            PlayerOne             = new OthelloPlayer(i_PlayerOneName, i_IsPlayerOneIsComputer);
            PlayerTwo             = new OthelloPlayer(i_IsPlayerTwoName, i_IsPlayerTwoIsComputer);
            m_TheOthelloBoardGame = new OthelloGameDisk[r_BoardLength, r_BoardLength];

            initBoardStartPosition();
        }
Esempio n. 2
0
        public OthelloGameLogic(OthelloGameLogic i_GameToCopy)
        {
            r_BoardLength         = i_GameToCopy.r_BoardLength;
            m_IsGameOver          = i_GameToCopy.m_IsGameOver;
            m_IsBlackTurn         = i_GameToCopy.m_IsBlackTurn;
            m_PlayerOne           = i_GameToCopy.m_PlayerOne;
            m_PlayerTwo           = i_GameToCopy.m_PlayerTwo;
            m_TheOthelloBoardGame = new OthelloGameDisk[r_BoardLength, r_BoardLength];

            for (int row = 1; row <= r_BoardLength; row++)
            {
                for (int column = 1; column <= r_BoardLength; column++)
                {
                    this[row, column] = i_GameToCopy[row, column];
                }
            }
        }