Parsing - nt314p/Zork GitHub Wiki
- Extract main command word, 2 objects
- Run command on object 1, pass in object 2
- If doesn't work, run command on object 2, pass in object 1
- Recieve string result, print it
Run in classes --> Player, character, game, door
Not enough params --> "Please be more specific" Not a command --> "This is not a command. Press 'c' to view commands"
String[ArrayList] params ArrayList[i].get(0) --> main command word ArrayList[i].get(j) --> synonyms
- will cycle through all and return closest match (run on the main command word)
- List of all the commands that must be implemented (ex. playerCommands, gameCommands, doorCommands)
- All commands return a string
- All main command words are in the interface