From 2c12d19204aa198bf8537bcdb137b40f0c7317e9 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 25 Sep 2016 18:38:34 +0200 Subject: Initial --- AmpelJonas/cPeasantTrafficLight.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 AmpelJonas/cPeasantTrafficLight.h (limited to 'AmpelJonas/cPeasantTrafficLight.h') diff --git a/AmpelJonas/cPeasantTrafficLight.h b/AmpelJonas/cPeasantTrafficLight.h new file mode 100644 index 0000000..88ec99b --- /dev/null +++ b/AmpelJonas/cPeasantTrafficLight.h @@ -0,0 +1,30 @@ +#pragma once +#include "stdafx.h" + +#define _CTL_COL_RED 0 +#define _CTL_COL_GREEN 1 + +//Counted clockwise, starting with the upper tl of west lane +#define _CTL_1 2 +#define _CTL_2 1 +#define _CTL_3 3 +#define _CTL_4 4 +#define _CTL_5 6 +#define _CTL_6 5 +#define _CTL_7 7 +#define _CTL_8 8 + +class cPeasantTrafficLight +{ +public: + cPeasantTrafficLight(int _type, int _startphase); + ~cPeasantTrafficLight(); + + void next(); + + cObject *getObject(); +private: + cObject *tl; + int iPhase; + int iType; +}; \ No newline at end of file -- cgit v1.2.3