diff --git a/Makefile b/Makefile index dea385f..68a6722 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ build: - g++ -c main.cpp -o main.o - g++ -o t main.o + g++ -c *.cpp -o *.o + g++ -o t *.o run: build ./t edit: diff --git a/robot.h b/robot.h new file mode 100644 index 0000000..c540dc2 --- /dev/null +++ b/robot.h @@ -0,0 +1,23 @@ +#ifndef ROBOT_HEADER +#define ROBOT_HEADER + +#include +using string = std::string; + +class robot { +private: + const string _name; + int _north; + int _east; + int _steps; +public: + void move_north(); + void move_east(); + void move_south(); + void move_west(); + int north(); + int east(); + int travelled(); +} + +#endif