reset password
Author Message
Miro138
Posts: 22
Posted 14:46 Oct 07, 2016 |

It states we're supposed to have a deck with 66 cards, 22 of each. There's no requirement regarding the population of the list so am I allowed to populate the Deck object in its constructor with 22 of each Card or am I to populate it with Cards after creating an instance of it? Also, there's no requirement stating if this is with or without replacement. Just want to make sure the assumption that it is without replacement is correct.  

Edit: Not sure what is meant by assume perfect play. As in, the computer will always pick a card that will trump the player's?

Last edited by Miro138 at 23:23 Oct 07, 2016.
msargent
Posts: 519
Posted 14:53 Oct 07, 2016 |

You can do it in the constructor. Drawing should be without replacement. When the deck runs out of cards, have it reshuffle.

msargent
Posts: 519
Posted 14:55 Oct 07, 2016 |

I updated the homework to reflect the without replacement requirement.

Miro138
Posts: 22
Posted 17:56 Oct 08, 2016 |

Still need some clarification on what is meant by "assume perfect play." Does the player pick the ideal choice each round? or does the house pick the ideal card (instead of a random card) to counter yours?  

msargent
Posts: 519
Posted 19:54 Oct 08, 2016 |

The computer, when it sees you lay down "paper", it picks "scissors", when you lay down "rock", it picks "paper", and when you lay down "scissors", it picks "rock."

msargent
Posts: 519
Posted 20:08 Oct 08, 2016 |

Regarding perfect play, if the computer doesn't have the ideal card, it just lays down the first card in its hand.