コード例 #1
0
        private void removeOccupiedCellFromOpponent(int i_Row, int i_Col)
        {
            CellPoint toRemove = new CellPoint(i_Row, i_Col);

            if (m_Othelo.Players[k_SecondPlayer].Id != m_CurrentPlayerTurn)
            {
                m_Othelo.Players[k_FirstPlayer].RemoveCell(toRemove);
            }
            else
            {
                m_Othelo.Players[k_SecondPlayer].RemoveCell(toRemove);
            }
        }
コード例 #2
0
        private void addOccupiedCellToPlayer(int i_Row, int i_Col)
        {
            CellPoint toAdd = new CellPoint(i_Row, i_Col);

            if (m_Othelo.Players[k_FirstPlayer].Id == m_CurrentPlayerTurn)
            {
                m_Othelo.Players[k_FirstPlayer].Occupie(toAdd);
            }
            else
            {
                m_Othelo.Players[k_SecondPlayer].Occupie(toAdd);
            }
        }
コード例 #3
0
 public void Occupie(CellPoint i_CellToOccupie)
 {
     AddCell(i_CellToOccupie);
 }
コード例 #4
0
 public void RemoveCell(CellPoint i_CellToRemove)
 {
     m_OccupiedCells.Remove(i_CellToRemove);
 }
コード例 #5
0
 public void AddCell(CellPoint i_CellToAdd)
 {
     m_OccupiedCells.Add(i_CellToAdd);
 }