Ejemplo n.º 1
0
        public int PlayCard(int cardChoice)
        {
            if (cardChoice < 0)
            {
                return(-1);
            }

            if (CurrentHand.Any(x => x == cardChoice))
            {
                int res = CurrentHand.First(x => x == cardChoice);
                if (res <= PlayerStatistics.ActualMana)
                {
                    CurrentHand.Remove(res);
                    PlayerStatistics.ActualMana -= res;
                    return(res);
                }
                else
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Zbyt mało many!");
                    Console.ResetColor();
                    return(-2);
                }
            }
            return(-1);
        }
Ejemplo n.º 2
0
 public void RemoveCard(Card card)
 {
     CurrentHand.Remove(card);
 }