Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 3
0
 public void Occupie(CellPoint i_CellToOccupie)
 {
     AddCell(i_CellToOccupie);
 }
Esempio n. 4
0
 public void RemoveCell(CellPoint i_CellToRemove)
 {
     m_OccupiedCells.Remove(i_CellToRemove);
 }
Esempio n. 5
0
 public void AddCell(CellPoint i_CellToAdd)
 {
     m_OccupiedCells.Add(i_CellToAdd);
 }