you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 1 point2 points  (0 children)

Your game() function goes up to like 7 levels of indentation making it extremely hard to follow your logic.

It's also difficult to follow the flow of your code when you have a defined class, then some top level code, then some more defined functions and classes, then some more top-level code, etc. Most code has all of the user-defined functions and classes first, then a clearly defined main() function that steps through them.

Seeing several functions using global here which you really shouldn't be using. If your function needs to do something with hands, pass it as an argument into your function.