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