private void ResetGame() { m_Board.ClearBoard(); m_CountTurns = 0; m_GameStatus = GameStatus.On; m_CurrPlayer = WhoIsPlaying.Player1; }
public Game(UI i_GameUserInterface) { m_Ui = i_GameUserInterface; m_GameStatus = GameStatus.On; m_CurrPlayer = WhoIsPlaying.Player1; m_CountTurns = 0; }
private void SetScoreToWinner(WhoIsPlaying i_Player) { if (i_Player == WhoIsPlaying.Player1) { Player1.Scores += 1; } else { Player2.Scores += 1; } }
private void SwitchPlayers() { if (m_Type == TypeOfGame.TwoPlayers) { m_CurrPlayer = m_CurrPlayer == WhoIsPlaying.Player1 ? WhoIsPlaying.Player2 : WhoIsPlaying.Player1; } else { m_CurrPlayer = m_CurrPlayer == WhoIsPlaying.Player1 ? WhoIsPlaying.Computer : WhoIsPlaying.Player1; } }
private void SetSymbolInCell(Cell i_ChosenCell, WhoIsPlaying i_Player) { m_Board.SetCell(i_ChosenCell, i_Player == WhoIsPlaying.Player1 ? m_Player1.Symbol : m_Player2.Symbol); }