Exemplo n.º 1
0
 internal void CheckBittenHunterCards(UserInterface ui)
 {
     foreach (Hunter h in Hunters)
     {
         if (h.NumberOfBites > 0)
         {
             if (h.NumberOfItems > 0 && h.ItemShownToDraculaForBeingBitten == null)
             {
                 string line;
                 do
                 {
                     line = ui.AskHunterToRevealItemForBeingBitten(h.Name);
                     ui.TellUser(GetItemByNameFromItemDeck(line).Name);
                 } while (GetItemByNameFromItemDeck(line).Name == "Unknown item" && h.ItemsKnownToDracula.FindIndex(itm => itm.Name == line) == -1);
                 if (h.ItemsKnownToDracula.FindIndex(itm => itm.Name == line) == -1)
                 {
                     h.ItemsKnownToDracula.Add(GetItemByNameFromItemDeck(line));
                 }
                 h.ItemShownToDraculaForBeingBitten = GetItemByNameFromItemDeck(line);
             }
             if (h.NumberOfEvents > 0 && h.EventShownToDraculaForBeingBitten == null)
             {
                 string line;
                 do
                 {
                     line = ui.AskHunterToRevealEvent(h.Name);
                     ui.TellUser(GetEventByNameFromEventDeck(line).name);
                 } while (GetEventByNameFromEventDeck(line).name == "Unknown event" && h.EventsKnownToDracula.FindIndex(ev => ev.name == line) == -1);
                 if (h.EventsKnownToDracula.FindIndex(ev => ev.name == line) == -1)
                 {
                     h.EventsKnownToDracula.Add(GetEventByNameFromEventDeck(line));
                 }
                 h.EventShownToDraculaForBeingBitten = GetEventByNameFromEventDeck(line);
             }
         }
     }
 }