Checking the player's initial script changes, numerical inputs and created a function for reseting profiles#95
Open
IoannisNik wants to merge 7 commits intoryanb:masterfrom
Open
Checking the player's initial script changes, numerical inputs and created a function for reseting profiles#95IoannisNik wants to merge 7 commits intoryanb:masterfrom
IoannisNik wants to merge 7 commits intoryanb:masterfrom
Conversation
Reset function for optional reseting of any player directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.