30 likes | 58 Views
FOR MORE CLASSES VISIT<br>tutorialoutletdotcom <br><br>Sort the cards in the player and computer hands before displaying them.<br>We want to display the cards to the user sorted by Suit and by Rank. We are considering the<br>order of suits to be from high, to low; spades, hearts, diamonds, clubs in that order. To do this<br>just after your calls to create the hands, but before you display the cards, add these 2 calls:<br>
E N D
want to display the cards to the user • FOR MORE CLASSES VISIT • tutorialoutletdotcom • Sort the cards in the player and computer hands before displaying them.We want to display the cards to the user sorted by Suit and by Rank. We are considering theorder of suits to be from high, to low; spades, hearts, diamonds, clubs in that order. To do thisjust after your calls to create the hands, but before you display the cards, add these 2 calls:SuperCardcomputerHand = myDeck.GetCards(howManyCards); // existing lineSuperCardplayersHand = myDeck.GetCards(howManyCards); // existing lineArray.Sort(computerHand); // add this line here