diff options
author | Joursoir <chat@joursoir.net> | 2021-03-08 20:36:26 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-03-08 20:36:26 +0000 |
commit | ac3ab1206a7bddec5312bf974479853429426dfa (patch) | |
tree | 26c0aacd3c78b8c2bd2d9db8c21af530d68459e6 /Vehicle.hpp | |
download | ascii-road-ac3ab1206a7bddec5312bf974479853429426dfa.tar.gz ascii-road-ac3ab1206a7bddec5312bf974479853429426dfa.tar.bz2 ascii-road-ac3ab1206a7bddec5312bf974479853429426dfa.zip |
init project
Diffstat (limited to 'Vehicle.hpp')
-rw-r--r-- | Vehicle.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 */ |