Example #1
0
 /// <summary>
 /// Resolves the situation when Dracula plays an Ally card
 /// </summary>
 /// <param name="game">The GameState</param>
 /// <param name="eventPlayedByDracula">The Ally Event</param>
 /// <param name="logic">The artificial intelligence component</param>
 private static void PlayDraculaAlly(GameState game, Event eventPlayedByDracula, DecisionMaker logic)
 {
     Console.WriteLine("Dracula drew ally {0}", eventPlayedByDracula.Name());
     Event allyToKeep;
     if (game.DraculaAlly == null)
     {
         allyToKeep = eventPlayedByDracula;
     }
     else
     {
         game.EventDiscard.Add(game.DraculaAlly);
         allyToKeep = logic.ChooseAllyToKeep(game, game.DraculaAlly.Event, eventPlayedByDracula);
     }
     game.DraculaAlly = game.EventDiscard.Find(card => card.Event == allyToKeep);
     game.EventDiscard.Remove(game.DraculaAlly);
     Console.WriteLine("{0} kept", allyToKeep.Name());
     game.Dracula.EncounterHandSize = game.DraculaAlly.Event == Event.DraculasBrides ? 7 : 5;
     game.Dracula.EventHandSize = game.DraculaAlly.Event == Event.ImmanuelHildesheim ? 6 : 4;
 }