Legedith / Dungeons

Learn Linux terminal commands through a text based adventure game
MIT License
15 stars 5 forks source link

Initial commit to remove ascii images from main code and implement OS detection #4

Closed am401 closed 4 years ago

am401 commented 4 years ago

Updates

I have looked to remove the ASCII art from the main body of the script itself. I felt this was making the overall readability slightly more difficult and I felt adding these as functions to a separate file that could then be called would improve the overall maintainability of the code.

I have also added as an initial step the OS check function to the top, creating banner() which accepts text to then be printed as banners. Depending on whether the user is using Linux or a different OS - it will either use figlet or Python's print() to create the message, removing compatibility issues in this regard. This could be expanded to cover other *nix based systems such as BSD as they generally have figlet too.

I also felt that having the white space in the code itself made readability slightly odd and for the most part I have replaced all of it with \t\t.

I also note that option 3 in the initial menu is not yet completed and the script would just exit at this point. I have created an elif to cover this with a message that this is a coming soon feature.

am401 commented 4 years ago

@Legedith let me know if you are happy with the adjustments made in this PR. If so I am looking to continue working on adding the find and grep we have discussed

Legedith commented 4 years ago

This greatly improves the readability and modularity!