Example #1
0
 /// <summary>
 /// Resolves the Evasion Event card
 /// </summary>
 /// <param name="game">The GameState</param>
 /// <param name="logic">The artificial intelligence component</param>
 private static void PlayEvasion(GameState game, DecisionMaker logic)
 {
     Console.WriteLine("Dracula played Evasion");
     if (HunterPlayingGoodLuckToCancelDraculaEvent(game, Event.Evasion, Event.Evasion, logic) > 0)
     {
         Console.WriteLine("Evasion cancelled");
         return;
     }
     var destination = logic.ChooseWhereToEvadeTo(game);
     int doubleBackSlot = -1;
     var cardDroppedOffTrail = game.Dracula.MoveTo(destination, Power.None, out doubleBackSlot);
     logic.AddEvasionCardToTrail(game);
     if (game.HuntersAt(destination).Any())
     {
         game.Dracula.RevealCardAtPosition(0);
         logic.EliminateTrailsThatDoNotContainLocationAtPosition(game, destination, 0);
     }
     else
     {
         logic.EliminateTrailsThatHaveHuntersAtPosition(game, 0);
     }
     if (doubleBackSlot > -1)
     {
         Console.WriteLine("Dracula Doubled Back to the location in slot {0}", doubleBackSlot + 1);
     }
     if (cardDroppedOffTrail != null)
     {
         DealWithDroppedOffCardSlots(game, new List<DraculaCardSlot> { cardDroppedOffTrail }, logic);
     }
     if (game.Dracula.Trail[0].EncounterTiles.Count == 0 && !game.HuntersAt(destination).Any())
     {
         game.Dracula.PlaceEncounterTileOnCard(
             logic.ChooseEncounterTileToPlaceOnDraculaCardSlot(game, game.Dracula.Trail[0]),
             game.Dracula.Trail[0]);
     }
 }