Adding Grep and Find commands
Legedith opened this issue · comments
I like the idea of using grep
for searching files for keys. I have previously implemented this where a user had to grep
through a log file for a phrase which would reveal an ascii art item.
find
would be a valuable tool to have as well. Could look at creating a specific file within a subdirectory such as .hidden.key
that the player would need to locate with something like:
find . -type f -name "*.key"
The specific scenario could be something along the lines of:
You have entered a room. There is a door on the opposite side, which is locked.
You must find the key to advance forward. Use 'ls' to see what's in the room.
When the user enters the room the game can create a number of directories:
chest
book
chest of drawers
...
etc
The hidden.key
can be added to one of the directories to be found. It can then contain a message that can be cat
'd out to reveal the next step forward.
Originally posted by @am401 in #1 (comment)
Thank you for assigning the above to me. I will get working on this later on today!
@Legedith - I have created PR #4 - for the time being I've implemented the OS check we discussed in the initial issue as well as removed the ASCII art from the main file as I was finding the readability difficult to follow in order to add the new features discussed. I aim to continue working on implementing the grep
and find
in the coming days, I think the greater challenge is creating the story arch to add it in.
This evenings work was mostly in order to improve the readability of the code and help with maintaining
Just merged the PR. if you want, we can brainstorm ideas for the story arch too.
Thank you! I've got a couple of ideas, re-reading the existing story line to see how it will best fit. Did you have an idea as to whether you wanted to have grep
or find
in basics or the good stuff arch?
I think they should go into the good stuff arch