From c87214432739ac8214c74b7b412c40ab483ed5d7 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Fri, 18 Nov 2022 12:33:13 +0000 Subject: [PATCH] inital cw --- Makefile | 4 ++-- robot.h | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 robot.h 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