コード例 #1
0
ファイル: Program.cs プロジェクト: UncleGus/dracula
 /// <summary>
 /// Determines if Dracula is playing Rage against a Hunter at the start of a combat
 /// </summary>
 /// <param name="game">The GameState</param>
 /// <param name="huntersInvolved">The list of Hunters involved in the combat</param>
 /// <param name="logic">The artificial intelligence component</param>
 /// <returns>True if Dracula successfully plays Rage</returns>
 private static Hunter DraculaIsPlayingRageAgainstHunter(GameState game, List<HunterPlayer> huntersInvolved,
     DecisionMaker logic)
 {
     var rageTarget = logic.ChooseToPlayRage(game, huntersInvolved);
     if (rageTarget != Hunter.Nobody)
     {
         Console.WriteLine("Dracula is playing Rage against {0}", rageTarget.Name());
         game.Dracula.DiscardEvent(Event.Rage, game.EventDiscard);
         if (HunterPlayingGoodLuckToCancelDraculaEvent(game, Event.Rage, Event.Rage, logic) > 0)
         {
             Console.WriteLine("Rage cancelled");
             return Hunter.Nobody;
         }
         return rageTarget;
     }
     return Hunter.Nobody;
 }