Gatech ECE 4180 Lab 4 Deal or No Deal Game -Alex Ferrara -Luke LeFeve

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed wave_player

Revision:
5:610461a90e3a
Parent:
4:1c7f2541afc1
Child:
6:a487ee40d30c
--- a/main.cpp	Mon Oct 31 08:59:30 2016 +0000
+++ b/main.cpp	Mon Oct 31 09:04:40 2016 +0000
@@ -158,7 +158,7 @@
 //int main() {
     stateTrigger = false;   
     buttonValue = 0;             
- 
+    bool round1 = true;
     interrupt.mode(PullUp);              
     interrupt.fall(&fallInterrupt);            // Attach interrupt and its mode respectively.
     draw_case_grid(); 
@@ -179,7 +179,14 @@
         led2=(key_code>>2) & 0x01;
         led1=(key_code>>3) & 0x01;
         
-        isCase[key_code] = true;
+        if(round1){
+            isCase[key_code] = true;
+            round1 = false;
+        }
+        else {
+            isOpen[key_code] = true;
+        }
+        
         draw_single_case(key_code+1);
             
         stateTrigger = false; //main is done, release interrupt handler for next button