Bladesodoom1895 / textrpg

My attempt at a text rpg game.
MIT License
2 stars 1 forks source link

Some functions call themselves #18

Closed Midnex closed 1 year ago

Midnex commented 1 year ago

Some functions call themselves, you should never call a the same function within the same function.

For example title_screen_selections calls itself if the user doesn't make a valid selection. You should use a while look to ensure the only enters what you want them to.

This can be seen in the following functions as well prompt, player_move, player_look, and riddles.

In the case of title screen you can remove title_screen_selections() from the last line, as if the user does not enter the right selection it will simply repeat the title_screen_selection function.

Bladesodoom1895 commented 1 year ago

I do believe all of these have been fixed.