Beispiel #1
0
 /// <summary>
 /// Determines if Dracula is playing Devilish Power to cancel an Event played by a Hunter
 /// </summary>
 /// <param name="game">The GameState</param>
 /// <param name="eventBeingPlayedNow">The Event being played now</param>
 /// <param name="eventInitiallyPlayed">The Event initially played at the beginning of this exchange</param>
 /// <param name="logic">The artificial intelligence component</param>
 /// <returns>True if Dracula successfully plays Devilish Power</returns>
 private static bool DraculaIsPlayingDevilishPowerToCancelEvent(GameState game, Event eventBeingPlayedNow,
     Event eventInitiallyPlayed, DecisionMaker logic, HunterPlayer hunterPlayingEvent)
 {
     if (logic.ChooseToCancelEventWithDevilishPower(game, eventBeingPlayedNow, eventInitiallyPlayed, hunterPlayingEvent))
     {
         Console.WriteLine("Dracula is playing Devilish Power to cancel {0}", eventBeingPlayedNow.Name());
         game.Dracula.DiscardEvent(Event.DevilishPower, game.EventDiscard);
         if (HunterPlayingGoodLuckToCancelDraculaEvent(game, Event.DevilishPower, eventInitiallyPlayed, logic) > 0)
         {
             return false;
         }
         return true;
     }
     return false;
 }