Simple Simon says mbed game which makes random queue, shows it with onboard LEDs and takes user input with push buttons.
Dependencies: PinDetect mbed beep
Simon.h
- Committer:
- tsoic
- Date:
- 2015-02-04
- Revision:
- 1:fb29354d9073
- Parent:
- 0:d53b17bb7ffa
- Child:
- 2:0b6e10420ce2
File content as of revision 1:fb29354d9073:
#ifndef SIMON_H #define SIMON_H #include "mbed.h" #include "PinDetect.h" #include <vector> class Simon { public: Simon(); void gameStart(int); void newQueue(); void showQueue(); bool userTurn(); void LEDSBlink(); private: void keyPressedSt(); void keyPressedNd(); void keyPressedRd(); void keyPressedTh(); void ReStart(); int testQueue(); static PinDetect button[]; static DigitalOut led[]; vector<int> queue; int i, test_val; bool button_press, run; unsigned int turn; }; #endif