/// <summary> /// Initialisiert einen Spieler mit dem angegebenen Typ und einer Armee. /// </summary> public Player(PlayerType playerType, Armee armee) { PlayerType = playerType; Armee = armee; ThrowDice(); }
/// <summary> /// Initialisiert das Skelett einer Player-Klasse. /// </summary> public Player(PlayerType playerType) { PlayerType = playerType; Armee = new Armee(); Withdrawn = new Armee(); DiceList = new List <int>(3); ThrowDice(); }
public bool Missing(Armee armee, string player) { var somethingMissing = false; if (armee.Stacks.Count == 0) { outputTextbox.Text += $"{player}, du hast keine Truppen ausgewählt! \r\n"; somethingMissing = true; } foreach (Stack stack in armee.Stacks) { if (stack.Count != 0) { continue; } outputTextbox.Text += $"{player}, gib deine Truppenzahl der {stack.StackUnit.Name} an!"; somethingMissing = true; } return(somethingMissing); }
public bool Equals(Armee that) { return(this.Stacks.SequenceEqual(that.Stacks)); }
private void swap(Armee armee) { armee.Stacks.Reverse(); }