From ac3ab1206a7bddec5312bf974479853429426dfa Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 8 Mar 2021 20:36:26 +0000 Subject: init project --- Vehicle.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Vehicle.hpp (limited to 'Vehicle.hpp') diff --git a/Vehicle.hpp b/Vehicle.hpp new file mode 100644 index 0000000..418a532 --- /dev/null +++ b/Vehicle.hpp @@ -0,0 +1,16 @@ +#ifndef ASCIIROAD_VEHICLE_H +#define ASCIIROAD_VEHICLE_H + +class Vehicle { + int type; + int pos_y, pos_x; +public: + Vehicle(int a_type, int a_y, int a_x) + : type(a_type), pos_y(a_y), pos_x(a_x) { } + ~Vehicle() { } + + void MoveRight() { pos_x++; } + bool Draw(int bound_x); /* return false if not draw anything */ +}; + +#endif /* ASCIIROAD_VEHICLE_H */ -- cgit v1.2.3-18-g5258