public virtual void Logik() { HasStarted = true; if (HasStoped) { return; } Vector2i vect = Player.Play(Field); OnPlayerMovedEvent(vect); Field.SetField(vect, Player.Symbol); if (IsBDarstellerValid()) { BDarsteller.Update(Field); BDarsteller.Draw(); } if (HasEnd()) { OnWinMessageEvent(Player.Symbol, FieldHelper.GetGameState(Field, Player)); BDarsteller.Enabled = false; } else { PlayerChange(); OnPlayerOutputEvent(Player.Ausgabe()); } }
public void Initialize() { OnWindowTitleChangeEvent("UniTTT - " + this.ToString()); if (IsBDarstellerValid()) { BDarsteller.Update(Field); BDarsteller.Draw(); } }
public virtual void NewGame() { Field.Initialize(); Player = Player1; BDarsteller.Initialize(Field.Width, Field.Height); BDarsteller.Update(Field); BDarsteller.Draw(); BDarsteller.Enabled = true; HasStoped = false; HasStarted = true; }