Beispiel #1
0
 void WriteBoard(Player p, DoubleStream stream)
 {
     foreach (var m in p.Minions)
     {
         WriteMinion(m, stream);
     }
     for (int i = 0, to = Field.MaxMinions - p.Count; i < to; i++)
     {
         stream.WriteEmpty(MinionLenght); //empty
     }
 }
Beispiel #2
0
 void WriteHand(Player p, DoubleStream stream)
 {
     foreach (var card in p.HandCards)
     {
         if (card is Spell s)
         {
             WriteSpell(s, stream);
         }
         else if (card is MinionCard m)
         {
             WriteMCard(m, stream);
         }
         else
         {
             throw new Exception("LOL WHAT?");
         }
     }
     for (int i = 0, to = Hand.MaxHand - p.HandCount; i < to; i++)
     {
         stream.WriteEmpty(CardLength);
     }
 }