Compare commits
2 Commits
1da7074bfc
...
fb03ddb7ba
Author | SHA1 | Date | |
---|---|---|---|
fb03ddb7ba | |||
c872144327 |
4
Makefile
4
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:
|
||||
|
22
robot.h
Normal file
22
robot.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef ROBOT_HEADER
|
||||
#define ROBOT_HEADER
|
||||
|
||||
#include <string>
|
||||
|
||||
class robot {
|
||||
private:
|
||||
const std::string _name;
|
||||
int _north;
|
||||
int _east;
|
||||
int _steps;
|
||||
public:
|
||||
void move_north();
|
||||
void move_east();
|
||||
void move_south();
|
||||
void move_west();
|
||||
int const north();
|
||||
int const east();
|
||||
int const travelled();
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user