private string GetLessThan4ScoreDescription() { var player1ScoreDescription = ScoreHelper.ScoreDescription(_player1Score); var player2ScoreDescription = ScoreHelper.ScoreDescription(_player2Score); return($"{player1ScoreDescription}-{player2ScoreDescription}"); }
private string GetTieScoreDescription() { if (_player1Point > 2) { return("Deuce"); } var scoreDescription = ScoreHelper.ScoreDescription(_player1Point); return($"{scoreDescription}-All"); }
private string GetTieScoreDescription() { if (_player1Score < 3) { var scoreDescription = ScoreHelper.ScoreDescription(_player1Score); return($"{scoreDescription}-All"); } else { return("Deuce"); } }
public string GetScore() { if (ScoreIsTied()) { return(GetTieScoreDescription()); } if (BothPlayersHaveLessThan4Points()) { var player1ScoreDescription = ScoreHelper.ScoreDescription(_player1Point); var player2ScoreDescription = ScoreHelper.ScoreDescription(_player2Point); return($"{player1ScoreDescription}-{player2ScoreDescription}"); } if (Player1Leads()) { return(GetPlayer1LeadingScore()); } else { return(GetPlayer2LeadingScore()); } }