I'd like to help but I am not familiar with game 4 in row and I have very little understanding what the code should do.
Therefore only nitpicking.
name 'game_over'. Wouldn't it be more logical to have 'game'.
Instead of:
There are nested while loops and breaking out from inner and outer can be tricky. Recommended practice is to use function instead of nested while-loop.
There are also (unnecessary) conversions and rows.
I would recommend to have a plan along those lines:
# validate user input for creating board
# validate user input of choices and .... /what should happen?
# how to determine when winning state is achieved (is this a game where should be a winner?)
# implement whatever rules the game has
# etc
# output winner
EDIT:
There is nice tutorial on this forum written by ichabod801 Validating User Input
Therefore only nitpicking.
name 'game_over'. Wouldn't it be more logical to have 'game'.
Instead of:
game_over = False while not game over:To have:
game = True while game:I can't see that game_over is used anywhere except in while loop threfore one can skip it altogether:
while True:In order to break out from while loop you must set looping condition so that it will stop if criteria is met. There is no change of value game_over and this loop will go on indefinitely.
There are nested while loops and breaking out from inner and outer can be tricky. Recommended practice is to use function instead of nested while-loop.
There are also (unnecessary) conversions and rows.
I would recommend to have a plan along those lines:
# validate user input for creating board
# validate user input of choices and .... /what should happen?
# how to determine when winning state is achieved (is this a game where should be a winner?)
# implement whatever rules the game has
# etc
# output winner
EDIT:
There is nice tutorial on this forum written by ichabod801 Validating User Input
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.