public string CheckForValidHand(List <Card> _cards, bool hasFaceCard) { var returnMessage = ""; if (_cards.Count == 4 || _cards.Count == 6 || _cards.Count == 7) { returnMessage = "Fib numbers only. \nTry Again."; return(returnMessage); } if (_cards.Count > 2 && hasFaceCard && !Hand.HasFaceCardStatic(_cards)) { returnMessage = "Need to discard face card when discarding more than 2 cards. \nTry Again."; return(returnMessage); } if (CalculateScore.MatchScore(_cards) > 0) { returnMessage = "Can't discard Duplicates. \nTry Again."; return(returnMessage); } return(returnMessage); }
public void GameOver(Player player) { Console.Clear(); player.DisplayHand(); Console.WriteLine("\n" + player.name + " Bonuses:\n"); player.currentScore = CalculateScore.Score(player.hand); player.currentScore += CalculateScore.FaceCardScore(player.hand); player.currentScore += CalculateScore.MatchScore(player.hand.cards); player.currentScore += CalculateScore.StraightScore(player.hand); Console.WriteLine("\nScore: " + player.currentScore + "\n"); WaitForEnter(); }