Esempio n. 1
0
        /*******************************************************************/
        public bool CanThisSelectorBeRemoved(string cardId, string investigatorId)
        {
            CardInfo     card         = cardRepository.Get(cardId);
            Investigator investigator = investigatorRepository.Get(investigatorId);

            if (investigator == null)
            {
                return(false);
            }
            if (investigator.IsMandatoryCard(card))
            {
                return(false);
            }
            if (investigator.IsPlaying && investigator.Xp <= 0)
            {
                return(false);
            }
            if (investigator.IsPlaying && !investigator.SelectionIsFull)
            {
                return(false);
            }
            return(true);
        }
 private bool IsThisCardInMax(CardInfo card, Investigator investigator) =>
 investigator.GetAmountOfThisCardInDeck(card) >= GameValues.MAX_SIMILARS_CARDS_IN_DECK;
 private bool IsThisCardWasted(CardInfo card) =>
 card.Quantity - investigatorRepository.AmountSelectedOfThisCard(card) <= 0;
 public void AddToMandatory(CardInfo card) => mandatoryCards.Add(card);
 public void RemoveToDeck(CardInfo card)
 {
     deck.Remove(card);
     LastCardRemoved = card;
 }
 public void AddToDeck(CardInfo card) => deck.Add(card);
 public int GetAmountOfThisCardInDeck(CardInfo card) => FullDeck.Count(cardInDeck => cardInDeck == card);
 /*******************************************************************/
 public bool IsMandatoryCard(CardInfo card) => mandatoryCards.Contains(card);
 /*******************************************************************/
 public Investigator(int physicTrauma, int mentalTrauma, int xp, bool isPlaying, bool isRetired, CardInfo info, DeckBuildingRules deckBuilding)
 {
     PhysicTrauma   = physicTrauma;
     MentalTrauma   = mentalTrauma;
     Xp             = xp;
     IsPlaying      = isPlaying;
     this.isRetired = isRetired;
     Info           = info;
     DeckBuilding   = deckBuilding;
 }
 /*******************************************************************/
 public void CreateWithThisCard(CardInfo cardInfo)
 {
     Info = cardInfo;
     cardsInGameRepository.Add(this);
 }
Esempio n. 11
0
 public int AmountLeftOfThisCard(CardInfo card) => (card.Quantity ?? 0) - AmountSelectedOfThisCard(card);
Esempio n. 12
0
 public int AmountSelectedOfThisCard(CardInfo card) =>
 investigators.Select(investigator => investigator.GetAmountOfThisCardInDeck(card)).Sum();
 /*******************************************************************/
 public bool IsThisCardUnlocked(CardInfo card) => cards.Contains(card);
 public void Add(CardInfo card) => cards.Add(card);