diff --git a/Jamaine.cpp/Location.h b/Jamaine.cpp/Location.h new file mode 100644 index 0000000..8a0c393 --- /dev/null +++ b/Jamaine.cpp/Location.h @@ -0,0 +1,69 @@ +#include +#include +#include + +class Location +{ + public: + std::vector locations; + std::string currentLocation; + int pointer; + + Location() + { + locations.push_back("start"); + locations.push_back("pond"); + locations.push_back("car"); + locations.push_back("lake"); + currentLocation = locations[0]; + } + + void go_north() + { + pointer+=1; + currentLocation = locations[pointer]; + } + + std::string get_location() + { + return currentLocation; + + } + + void go_south() + { + pointer+=1; + currentLocation = locations[pointer]; + } + + std::string get_location() + { + return currentLocation; + + } + + void go_west() + { + pointer+=1; + currentLocation = locations[pointer]; + } + + std::string get_location() + { + return currentLocation; + + } + + void go_east() + { + pointer+=1; + currentLocation = locations[pointer]; + } + + std::string get_location() + { + return currentLocation; + + } + +};