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
GameOver.cpp
00001 #include "States.h" 00002 00003 GameOver::GameOver(uLCD_4DGL &uLCD, PinDetect &Button0, PinDetect &Button1, 00004 PinDetect &Button2, PinDetect &Button3, 00005 int winningPlayer) 00006 { 00007 00008 uLCD.background_color(BLACK); 00009 00010 00011 uLCD.cls(); 00012 uLCD.textbackground_color(BLACK); 00013 uLCD.color(WHITE); 00014 uLCD.printf("\n Game Over \n"); 00015 00016 //display the game over screen with the winning player 00017 if(winningPlayer == 1) 00018 { 00019 uLCD.locate(0, 5); 00020 uLCD.printf("\n"); 00021 uLCD.printf(" PLAYER 1 WINS!! \n"); 00022 uLCD.printf("\n"); 00023 uLCD.printf(" PLAYER 2 SUCKS... \n"); 00024 } 00025 else 00026 { 00027 uLCD.printf("\n"); 00028 uLCD.printf(" PLAYER 2 WINS!! \n"); 00029 uLCD.printf("\n"); 00030 uLCD.printf(" PLAYER 1 SUCKS... \n"); 00031 } 00032 00033 //return after any button press 00034 while(Button0 && Button1 && Button2 && Button3) {} 00035 }
Generated on Fri Jul 22 2022 05:53:26 by
1.7.2