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); }
public void RemoveCard(Card card) { CurrentHand.Remove(card); }