コード例 #1
0
ファイル: TehiGame.cs プロジェクト: jywkim/Tehi
 public void Deal()
 {
     foreach (PlayingCard card in hand)
     {
         deck.Add(card);
     }
     hand.Clear();
     deck.Shuffle();
     for (int i = 0; i < 5; i++)
     {
         PlayingCard card = deck.Deal();
         card.FaceUp = true;
         hand.Add(card);
     }
     HandsDealt++;
     if (Score > BestHandScore)
     {
         BestHandScore = Score;
     }
     CanSwapCards = true;
 }
コード例 #2
0
 public void Deal()
 {
     Started = DateTime.Now;
     for (LoopsCompleted = 0; LoopsCompleted < repeat; LoopsCompleted++)
     {
         deck.Shuffle();
         PlayingCard card = deck.Deal();
         if (card.Suit == CardSuit.Hearts)
         {
             count++;
         }
         deck.Add(card);
     }
     Ended = DateTime.Now;
 }