예제 #1
0
파일: Game.cs 프로젝트: NoamGaloz/TikTacToe
 private void ResetGame()
 {
     m_Board.ClearBoard();
     m_CountTurns = 0;
     m_GameStatus = GameStatus.On;
     m_CurrPlayer = WhoIsPlaying.Player1;
 }
예제 #2
0
파일: Game.cs 프로젝트: NoamGaloz/TikTacToe
 public Game(UI i_GameUserInterface)
 {
     m_Ui         = i_GameUserInterface;
     m_GameStatus = GameStatus.On;
     m_CurrPlayer = WhoIsPlaying.Player1;
     m_CountTurns = 0;
 }
예제 #3
0
파일: Game.cs 프로젝트: NoamGaloz/TikTacToe
 private void SetScoreToWinner(WhoIsPlaying i_Player)
 {
     if (i_Player == WhoIsPlaying.Player1)
     {
         Player1.Scores += 1;
     }
     else
     {
         Player2.Scores += 1;
     }
 }
예제 #4
0
파일: Game.cs 프로젝트: NoamGaloz/TikTacToe
 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;
     }
 }
예제 #5
0
파일: Game.cs 프로젝트: NoamGaloz/TikTacToe
 private void SetSymbolInCell(Cell i_ChosenCell, WhoIsPlaying i_Player)
 {
     m_Board.SetCell(i_ChosenCell, i_Player == WhoIsPlaying.Player1 ? m_Player1.Symbol : m_Player2.Symbol);
 }