示例#1
0
 private void PlayRage(List<Hunter> huntersInCombat, UserInterface ui)
 {
     Hunter ragedHunter = Dracula.ChooseHunterToRage(huntersInCombat);
     ui.TellUser(ragedHunter.Name + " must show me all items and I will discard one");
     List<ItemDetail> itemsInHunterHand = new List<ItemDetail>();
     string cardInRagedHunterHand;
     do
     {
         cardInRagedHunterHand = ui.GetNameOfCardInRagedHunterHand();
         if (GetItemByNameFromItemDeck(cardInRagedHunterHand).Name != "Unknown item")
         {
             itemsInHunterHand.Add(GetItemByNameFromItemDeck(cardInRagedHunterHand));
         }
     } while (GetItemByNameFromItemDeck(cardInRagedHunterHand).Name == "Unknown item" && cardInRagedHunterHand.ToLower() != "none");
     ItemDetail itemToDiscard = Dracula.ChooseItemCardToDiscard(itemsInHunterHand);
     ui.TellUser("Discarding " + itemToDiscard.Name);
     DiscardItemFromHunterAtIndex(itemToDiscard.Name, Array.FindIndex(Hunters, h => h.Name == huntersInCombat.First().Name), ui);
 }