Mortal Kombat Game ELEC2645
Dependencies: mbed N5110 ShiftReg Joystick
Diff: Abandoned.cpp
- Revision:
- 3:1d99b6ad4f9e
- Parent:
- 1:3bdadf6f6dbd
- Child:
- 6:a1a7dc264fed
--- a/Abandoned.cpp Sat Apr 17 12:35:18 2021 +0000 +++ b/Abandoned.cpp Mon Apr 19 18:38:59 2021 +0000 @@ -1,6 +1,30 @@ // This file includes abandoned code that was replaced because it did not work /* +int get_user_input(int &input) { + while (1) { + if (buttonA.read() == 1) { + input = 1; + break; + } + if (buttonB.read() == 1) { + input = 2; + break; + } + if (buttonC.read() == 1) { + input = 3; + break; + } + if (buttonD.read() == 1) { + input = 4; + break; + } + } + return input; +} + + + void abandoned_function() { // getting joystick coordinates using Vector2D // joystick centered at 0 with (1,0) being utmost right and (-1,0) being utmost left