blob: 4e5e854c1045f3e5ee6f9e9c7ded048c89d3d94c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#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() { }
int GetLength();
void MoveRight() { pos_x++; }
bool Draw(int bound_x); /* return false if not draw anything */
};
struct ll_vehicle {
Vehicle *data;
struct ll_vehicle *next;
ll_vehicle(Vehicle *a_data, struct ll_vehicle *a_ptr)
: data(a_data), next(a_ptr) { }
};
#endif /* ASCIIROAD_VEHICLE_H */
|