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-10
- Revision:
- 5:94c215df2b7c
- Parent:
- 4:32b02dd83c0d
File content as of revision 5:94c215df2b7c:
#ifndef SIMON_H #define SIMON_H #include "mbed.h" #include "PinDetect.h" #include "Piezo.h" #include <vector> class Simon { public: Simon(); void gameStart(int); private: void newQueue(); void showQueue(); bool userTurn(); void LEDSBlink(); void keyPressedSt(); void keyPressedNd(); void keyPressedRd(); void keyPressedTh(); void ReStart(); int testQueue(); Piezo piezo; static PinDetect button[]; static DigitalOut led[]; vector<int> queue; int i, test_val, first_turn; bool button_press, run; unsigned int turn; }; #endif