Beispiel #1
0
 public HandOf5Summary(HandOf5 handOf5)
 {
     Ranks = handOf5.Cards.Select(c => c.Rank).ToList();
     Ranks.Sort();
     SameColor = handOf5.Cards.All(c => c.Suit == handOf5.Cards.First().Suit);
     Score     = handOf5.Score;
 }
Beispiel #2
0
 public static int GetScoreFor5Cards(HandOf5 handOf5)
 {
     return(_records[Utils.GetStringForCards(handOf5.Cards)].Score);
 }
 public void ShowBestHand(string playerName, HandOf5 bestHand)
 {
     _sb.AppendLine($"{playerName} got {bestHand.HandValue.HandEnum}/{string.Join("", bestHand.Cards.Select(TranslateCardString))}/score={bestHand.Score}");
 }
Beispiel #4
0
 public void RecordBestHand(string playerName, HandOf5 bestHand)
 {
     _gameReporter.ShowBestHand(playerName, bestHand);
 }
Beispiel #5
0
 public HandSlimRecord(HandOf5 hand)
 {
     Score      = hand.Score;
     HandString = Utils.GetStringForCards(hand.Cards);
 }