         sendSequence += String(btnLog[i]);
       }
       Serial.println(sendSequence);
+      sendSequence = "";
       creatingSequence = false;
-    }
+      listeningToButtons = false;
+    }
+  }
+
+  if (gameOver)
+  {
+    Serial.println("Game Over");
+    gameOver = false;
   }
   
 
   //-----------------------------------------------------------------------------------------------
   //----------------------seperate from status blocks of code -------------------------------------
   //-----------------------------------------------------------------------------------------------
-  if (listeningToButtons)
-  {
+  if (listeningToButtons){
     for (int i = 0; i < 4; i ++)
     {
       int cur = digitalRead(btn[i]);

String sendMorse = "";

//The queue for the morse code
QueueList<char> morQue;

//To control how morse code is output
const int dotLength = 500;
const int dashLength = 3*dotLength;

//hash morse code 'characters' to their appropriate responces.
const byte HASH_SIZE = 5;
HashType<char*,int> hashRawArray[HASH_SIZE];
HashMap<char*,int> morseMap = HashMap<char*,int>(hashRawArray , HASH_SIZE );
int morState = 0;
unsigned long morLength = 0;
unsigned long morStart = 0;
boolean morseAvailable = false;
const int dot = 700;

//Status trackers
boolean displayingSequence = false;
boolean repeatingSequence = false;
boolean displayResultAnimation = false;
boolean creatingSequence = false;
boolean listeningToButtons = false;
boolean playerWasCorrect = true;

//customizable display, just set indexes appropriately in displayResultAnimation
int animationArr[] = {0,1,2,3,0,1,2,3,0,1,2,3,0,-1,0,-1,0,-1,0};
int animationIndex = -1;
int endI;
const int animationLEDonDuration = 100;

    pinMode(led[i], OUTPUT);
  }
  recString.reserve(400);
}


