Beispiel #1
0
 public LockMove(Board board, ICollection <IStack> sources, LockableStack destination, Unit unit)
 {
     Board       = board;
     Sources     = sources;
     Destination = destination;
     Unit        = unit;
 }
Beispiel #2
0
 private static void PopulateLockable(LockableStack stack)
 {
     Console.WriteLine($"Cards for {stack}");
     if ($"Is {stack} locked in? {{0}}".AskForDecision(CliHelper.Yes, CliHelper.No) == CliHelper.Yes)
     {
         var color = "What color are the dragons? {0}".AskForDecision(Card.BaseColors);
         foreach (var _ in Enumerable.Range(0, 4))
         {
             stack.Cards.Add(Print(new Card(color, Value.Dragon)));
         }
         stack.Locked = true;
     }
     else
     {
         var card = AskForCard();
         if (card != null)
         {
             stack.Cards.Add(Print(card));
         }
     }
     Console.WriteLine();
 }