reset password
Author Message
fumjum
Posts: 27
Posted 23:46 Sep 14, 2016 |

I know Mark said we do not need to check the type of input and to assume they enter a number, but do we need to check that the player doesn't bet more money than they have, or should we assume that they will bet bellow or equal to their money? If we do need to check it, where in the code do we loop to get the q1.question to repeat without dealing two new game cards if they try to bet more than they have?

msargent
Posts: 519
Posted 06:59 Sep 15, 2016 |

I didn't really ask for it in the homework, so you don't need to check that. The only thing that needs to be checked is how many cards are left in the deck (shuffle when there aren't enough to play the next round).

BrianK
Posts: 25
Posted 15:42 Sep 15, 2016 |

* I know it's not required but, :*

You should do this at the beginning of every loop.  You can do this with an if,else block, wherein when the if statement is satisfied, it will run the code, else it will do nothing and ask the player if they want to play again. You can also switch these two around, so the if is the rejected state and the else is the accepted one.

Last edited by BrianK at 15:43 Sep 15, 2016.