Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem mbed-rtos mbed wave_player 4DGL-uLCD-SE PinDetect
Diff: main.cpp
- Revision:
- 1:4976bbb3376f
- Parent:
- 0:75716bd37804
--- a/main.cpp Mon Mar 14 03:04:08 2016 +0000
+++ b/main.cpp Mon Mar 14 16:19:47 2016 +0000
@@ -67,6 +67,8 @@
}
case(SinglePlayerGame):
{
+ //after gameplay returns, we can use gameplay.getWinningPlayer() to find out who won.
+ //this gets passed to the GameOver to display the correct winner on the screen
Gameplay gameplay(uLCD, 1, P1_LeftButton, P1_RightButton, P2_LeftButton, P2_RightButton);
GameOver gameover(uLCD, P1_LeftButton, P1_RightButton, P2_LeftButton, P2_RightButton, gameplay.getWinningPlayer());
state = MainMenu;