Mortal Kombat Game ELEC2645
Dependencies: mbed N5110 ShiftReg Joystick
Diff: Abandoned.cpp
- Revision:
- 1:3bdadf6f6dbd
- Parent:
- 0:99b49fd71085
- Child:
- 3:1d99b6ad4f9e
diff -r 99b49fd71085 -r 3bdadf6f6dbd Abandoned.cpp --- a/Abandoned.cpp Tue Apr 13 10:06:02 2021 +0000 +++ b/Abandoned.cpp Sat Apr 17 11:38:39 2021 +0000 @@ -1,3 +1,4 @@ +// This file includes abandoned code that was replaced because it did not work /* void abandoned_function() { @@ -66,3 +67,45 @@ }; */ + +/* +void menu_select() { + char button = get_user_input(); + switch (button) { + case 'A': + menu.play(lcd); + break; + case 'B': + menu.tutorial(lcd); + break; + case 'C': + menu.options_menu(lcd); + break; + default: + menu.homescreen(lcd); + break; + } +} + +char get_user_input() { + char button; + while (buttonA.read() == 1) { + button = 'A'; + wait(0.2); + } + while (buttonB.read() == 1) { + button = 'B'; + wait(0.2); + } + while (buttonC.read() == 1) { + button = 'C'; + wait(0.2); + } + while (buttonD.read() == 1) { + button = 'D'; + wait(0.2); + } + pc.printf("Value is %c", button); + return button; +} +*/