   }
 }
 
+void victoryLoop(char color){
+  for (int i=0; i < 9; i++){
+    clearSquares();
+    if (color == 'g'){
+      squares[i]->setGreen();
+    } else if (color == 'r'){
+      squares[i]->setRed();
+    } 
+    delay(100);
+  }
+  
+}
+
 void restartGame(){
-  allClear();
+  clearSquares();
   allGreen();
   delay(200);
   allRed();
   delay(200);
   allGreen();
   delay(600);
-  allClear();
-  
-  redStatus [] = {0,0,0,0,0,0,0,0,0};
-  greenStatus [] = {0,0,0,0,0,0,0,0,0};
+  clearSquares();
+
   redVictory = false;
   greenVictory = false;
 }


// the loop routine runs over and over again forever:
void loop() {
  if (!redVictory && !greenVictory){
    updateColorStatus();
  }

      redStatus[i] = 1;
    } else if (color == 'n'){
      squares[i]->clear();
      redStatus[i] = 0;
      greenStatus[i] = 0;
    }
  }  
}
