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

Committer:
fomartin
Date:
Mon Mar 14 03:04:08 2016 +0000
Revision:
0:75716bd37804
Child:
1:4976bbb3376f
Mexican Standoff Prototype;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fomartin 0:75716bd37804 1 #include "States.h"
fomartin 0:75716bd37804 2
fomartin 0:75716bd37804 3 GameOver::GameOver(uLCD_4DGL &uLCD, PinDetect &Button0, PinDetect &Button1,
fomartin 0:75716bd37804 4 PinDetect &Button2, PinDetect &Button3,
fomartin 0:75716bd37804 5 int winningPlayer)
fomartin 0:75716bd37804 6 {
fomartin 0:75716bd37804 7
fomartin 0:75716bd37804 8 uLCD.background_color(BLACK);
fomartin 0:75716bd37804 9
fomartin 0:75716bd37804 10
fomartin 0:75716bd37804 11 uLCD.cls();
fomartin 0:75716bd37804 12 uLCD.textbackground_color(BLACK);
fomartin 0:75716bd37804 13 uLCD.color(WHITE);
fomartin 0:75716bd37804 14 uLCD.printf("\n Game Over \n");
fomartin 0:75716bd37804 15
fomartin 0:75716bd37804 16 if(winningPlayer == 1)
fomartin 0:75716bd37804 17 {
fomartin 0:75716bd37804 18 uLCD.locate(0, 5);
fomartin 0:75716bd37804 19 uLCD.printf("\n");
fomartin 0:75716bd37804 20 uLCD.printf(" PLAYER 1 WINS!! \n");
fomartin 0:75716bd37804 21 uLCD.printf("\n");
fomartin 0:75716bd37804 22 uLCD.printf(" PLAYER 2 SUCKS... \n");
fomartin 0:75716bd37804 23 }
fomartin 0:75716bd37804 24 else
fomartin 0:75716bd37804 25 {
fomartin 0:75716bd37804 26 uLCD.printf("\n");
fomartin 0:75716bd37804 27 uLCD.printf(" PLAYER 2 WINS!! \n");
fomartin 0:75716bd37804 28 uLCD.printf("\n");
fomartin 0:75716bd37804 29 uLCD.printf(" PLAYER 1 SUCKS... \n");
fomartin 0:75716bd37804 30 }
fomartin 0:75716bd37804 31
fomartin 0:75716bd37804 32 while(Button0 && Button1 && Button2 && Button3) {}
fomartin 0:75716bd37804 33 }