コード例 #1
0
 public OthelloGameLogic(int i_BoardSize, bool i_VsHuman)
 {
     m_GameBoard = new GameBoard(i_BoardSize);
     m_AllEmptySlots = new List<OthelloSlot>();
     m_Player1 = new Player("Black", r_Player1SlotType, true);
     m_Player2 = new Player("White", r_Player2SlotType, i_VsHuman);
     m_ActivePlayer = m_Player1;
     m_IsGameActive = true;
 }
コード例 #2
0
 private int getNumOfCoins(Player i_PlayerToCheck)
 {
     return (i_PlayerToCheck == m_Player1) ? m_Player1NumOfCoins : m_Player2NumOfCoins;
 }
コード例 #3
0
 private void changeActivePlayer()
 {
     if (m_ActivePlayer.Equals(m_Player1))
     {
         m_ActivePlayer = m_Player2;
     }
     else
     {
         m_ActivePlayer = m_Player1;
     }
 }