Objective
Creat a BFS search that will figure out the path from the player's current location to the desired room id.
HINT: Don't forget we did a lab on BFS that will help with the skeleton code here
Requirements
- Get familiar with the
muddydriver
folder, there's 4 files in there
- Create an enum in
data.h
typedef enum Directions {
NORTH = 'n', SOUTH = 's', EAST = 'e', WEST = 'w'
} Directions;
- Check out the class BFSMuddyDriver in bfs_muddy_driver.h
- Define methods for
BFSMuddyDriver
in bfs_muddy_driver.cpp
- READ through the comments
- Inside the method
solve
:
- Add a "f" / "find" command to the MUD's operational commands
- After the player inputs "find", prompt them to enter the room Id of the destination.
- Use the
BFSMuddyDriver.solve
and pass in the starting room id and the destination room id