1D-Pong game based on a LED strip with 150 LPD6803-controlled pixels. Game keeps score for 'best-of-21' game. Written for KL25Z

Dependencies:   MODSERIAL mbed

Committer:
vsluiter
Date:
Tue Aug 27 18:54:15 2013 +0000
Revision:
21:a554229e884b
Child:
26:448ee3b0b481
separated game code from more general paddle and button classes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vsluiter 21:a554229e884b 1 #ifndef _GAMEBUTTON_H_
vsluiter 21:a554229e884b 2 #define _GAMEBUTTON_H_
vsluiter 21:a554229e884b 3
vsluiter 21:a554229e884b 4 #include "mbed.h"
vsluiter 21:a554229e884b 5 class GameButton
vsluiter 21:a554229e884b 6 {
vsluiter 21:a554229e884b 7 public:
vsluiter 21:a554229e884b 8 GameButton(){};
vsluiter 21:a554229e884b 9 GameButton(PinName pin, float time);
vsluiter 21:a554229e884b 10 bool pushflag;
vsluiter 21:a554229e884b 11 bool getTimeoutActive(void);
vsluiter 21:a554229e884b 12 protected:
vsluiter 21:a554229e884b 13 virtual void pushhandlercallback(void){};
vsluiter 21:a554229e884b 14 private:
vsluiter 21:a554229e884b 15 InterruptIn *intpin;
vsluiter 21:a554229e884b 16 Timeout timeout;
vsluiter 21:a554229e884b 17 float m_time;
vsluiter 21:a554229e884b 18 bool m_timeoutactive;
vsluiter 21:a554229e884b 19 void TimeOutHandler(void);
vsluiter 21:a554229e884b 20 virtual void PushHandler(void);
vsluiter 21:a554229e884b 21 };
vsluiter 21:a554229e884b 22
vsluiter 21:a554229e884b 23
vsluiter 21:a554229e884b 24 #endif