swag

Dependencies:   Motor Servo mbed_tictactoe

Revision:
3:317e06586628
Parent:
2:cbc3ef689c91
Child:
4:6342714f3bc3
--- a/main.cpp	Tue Oct 20 04:48:15 2015 +0000
+++ b/main.cpp	Tue Oct 20 12:55:55 2015 +0000
@@ -1,3 +1,9 @@
+/*
+Matthew Sims and Ryan Limjoco
+Robot that plays you in tic tac toe
+Shorr 1001
+*/
+
 #include "mbed.h"
 #include "Motor.h"
 #include "Servo.h"
@@ -89,6 +95,8 @@
     }
 
     //Operates LED's based on winner
+    lights[difficulty-1]=0;
+    lights[4]=0;
     if(winner()==playerchip) { //Light Boucnes back and forth if player wins
         while(1) {
             for(int i=0; i<=4; i++) {
@@ -211,8 +219,8 @@
             x=xglobal;
             y=yglobal;
         }
+        placechip(x,y);
         board[x][y]=chip;
-        placechip(x,y);
     }
 }