Advertisement
benco

Untitled

Apr 21st, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1.  
  2.     //straight flush
  3.     Hand hand3 = Hand(3);
  4.     for (int i = 1; i < 6; i++){  Card::Rank loopRank = (Card::Rank)i; Card* card = new Card(loopRank, Card::H); hand3.AddCard(card);  }
  5.  
  6.     // full house
  7.     Hand hand = Hand(1);
  8.             for (int i = 0; i < 2; i++) { hand.AddCard(carda); }  for (int i = 0; i < 3; i++) {  hand.AddCard(cardb);   }
  9.  
  10.     // flush
  11.     Hand hand2 = Hand(2);
  12.     for (int i = 0; i < 5; i++) {  hand2.AddCard(carda);  }
  13.  
  14.     hand.Evaluate();
  15.     cout << hand.ToString();
  16.     hand2.Evaluate();
  17.     cout << hand2.ToString();
  18.     hand3.Evaluate();
  19.     cout << hand3.ToString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement