
not running
Diff: Car.h
- Revision:
- 0:3b4906b8a747
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Car.h Tue Dec 10 22:29:09 2019 +0000 @@ -0,0 +1,26 @@ +#ifndef _CAR_H_ +#define _CAR_H_ + +#include "Road.h" +#include "mbed.h" + +class Road; + +class Car { +public: + int position; + int speed; + int flag; + + Car(int id, Road* road, int flag); + void update(); + void reset(int position, int speed); + void stop(); + +protected: + int id; + int cycle; + Road* road; + Thread* thread; +}; +#endif \ No newline at end of file