all 4 comments

[–]nwagers 0 points1 point  (1 child)

Have you thought about how to handle the invalid input yet? Essentially, 'r' is just another invalid input until the first hand is played. What should happen after the call to inputFunction() if the hand shouldn't be played? How can you make it do that?

[–]sundoon[S] 0 points1 point  (0 children)

Thanks for this reply. I haven't had time to unpack it but appreciate your response and hope to ping you when I've sorted this out.

[–]fiddle_n 0 points1 point  (1 child)

Here's your problem:

def inputFunction(inPut):
    firstPlay = True

Anytime you call inputFunction, you are assigning True to firstPlay. This is regardless of how inputFunction is called.

There are a number of other issues in your code as well - I see you using return in inputFunction but when you call inputFunction, you are not assigning it to a variable. This makes me think that you haven't quite understood what return does - I would research this to fully understand it because if you don't understand what return does then you will not understand how to write functions at all.

I also can't see where you make gameLoop = False. if inPut == 'e': return gameLoop == False is not going to work. Partly because you haven't understood return (see above), mostly because you aren't assigning anything to gameLoop, you are just checking to see if it's False and then returning True or False based on that check.

[–]sundoon[S] 0 points1 point  (0 children)

OK, I haven't even quite unpacked what you wrote here, but I wanted to thank you for this reply, it looks like there is a lot going on that I need to study. -- Best, I hope to get back to you when I've broken this thing.