ruby-warrior
ruby-warrior copied to clipboard
Checking the player's initial script changes, numerical inputs and created a function for reseting profiles
For the first case I added an if-case for whether the player has changed the template code in his profile's player.rb at all, before running the game, along with 2 seperate functions for compairing the template file with the player's file.
I also thought it to be a good idea to check in on the user's input when trying to access or reset a profile,or choose a difficulty level so, i added a loop on the choose method of the ui.rb file, asking for input again if the numerical input exceeds the number of options.
Additionally, I added a reset function with which the player can reset a profile he wants. I also added a -r option in the parse_options method for the user to choose which profile to reset.