예제 #1
0
파일: Program.cs 프로젝트: UncleGus/dracula
 /// <summary>
 /// Determines if Dracula is playing Customs Search on a Hunter
 /// </summary>
 /// <param name="game">The GameState</param>
 /// <param name="hunterMoved">The Hunter who moved</param>
 /// <param name="origin">The original Location</param>
 /// <param name="logic">The artificial intelligence component</param>
 /// <returns>True if Dracula successfully plays Customs Search</returns>
 private static bool DraculaIsPlayingCustomsSearch(GameState game, Hunter hunterMoved, Location origin,
     DecisionMaker logic)
 {
     if (logic.ChooseToPlayCustomsSearch(game, hunterMoved, origin))
     {
         Console.WriteLine("Dracula is playing Customs Search");
         game.Dracula.DiscardEvent(Event.CustomsSearch, game.EventDiscard);
         if (HunterPlayingGoodLuckToCancelDraculaEvent(game, Event.CustomsSearch, Event.CustomsSearch, logic) > 0)
         {
             Console.WriteLine("Customs Search cancelled");
             return false;
         }
         return true;
     }
     return false;
 }