public void Run() { do { if (!_gameMode.HasStoped) { _gameMode.LogikLoop(); } if (_gameMode is Logik.Game.NetworkGame) { ((Logik.Game.NetworkGame)_gameMode).OnWinMessageEvent(_gameMode.Player1.Symbol, UniTTT.Logik.FieldHelper.GetGameState(_gameMode.Field, _gameMode.Player)); if (_gameMode.Player1.Symbol == 'X') { if (NewGameQuestion()) { _gameMode.OnNewGameEvent(); } } else { Console.WriteLine("Warte auf neues Spiel.."); while (!_gameMode.HasStarted) { } ; } } else { if (NewGameQuestion()) { _gameMode.NewGame(); } else { break; } } } while (true); }
private void NewStart() { _game.OnNewGameEvent(); ResetGame(); }