This is the Mexican Standoff prototype made by Francisco Martin and Andrew Smith. Please refer to the following link for instructions on hardware hookup: https://developer.mbed.org/users/fomartin/notebook/mexican-standoff-reaction-game/
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