コード例 #1
0
ファイル: Program.cs プロジェクト: MattPuzey/Katas
        public static Hand MapInputToHand(string input)
        {
            Hand hand = new Hand();

            var clippedInput = input.Replace(" ", "");
            var cardStrings = Split(clippedInput, 2);

            foreach (string cardString in cardStrings)
            {
                Card card = new Card();
                card.Rank = cardString[0];
                card.Suit = Card.SuitMapper(cardString[1].ToString());
                hand.Cards.Add(card);
            }

            return hand;
        }
コード例 #2
0
 public bool Equals(Card card)
 {
     return(Value == card.Value);
 }