           }
         }
         // Drop the counter
-        strip.setPixelColor(c, humanColour);
-        strip.show();
-        dropCounter(board, human, c);
+        dropCounter(board, token[whosTurn], c);
         displayBoard(board);
         updateScreen();
-        if (score(board, human, robot) == 1000) {
+        
+        // Has the game been won?
+        currentScore = score(board, 'O', 'X');
+        if (currentScore == 1000) {
           strcpy(screen[0], "You Won!");
           updateScreen();
-          while (true) {
-          }
+          while (true) {}
+        }
+        else if (currentScore == -1000) {
+          strcpy(screen[0], "You lost!");
+          updateScreen();
+          while (true) {}
         }
         else {
-          //unsigned long t = millis();
-          strcpy(screen[0], "My go:");
-          updateScreen();
-          currentScore = bestMove(board, robot, human, best, 4);
-          digitalWrite(LED, LOW);
-          //Serial.println(millis() - t);
-          for (byte i=0; i<=6; i++) {
-            strip.setPixelColor(i, 0);
-          }
-          strip.setPixelColor(best, robotColour);
-          strip.show();
-          dropCounter(board, robot, best);
-          displayBoard(board);
-          if (score(board, robot, human) == 1000) {
-            strcpy(screen[0], "You Lost!");
+          
+          // The game continues
+          if (whosTurn == human) {
+            
+            // Indicate the move the human made
+            strip.setPixelColor(c, neoPixelColour[playerColour[human]]);
+            strip.show();
+
+            // The robot takes a go
+            whosTurn = robot;
+            strcpy(screen[0], "My go:");
             updateScreen();
-            while (true) {
+            
+            // Robot decides its move
+            currentScore = bestMove(board, 'X', 'O', robotMove, 4);
+            digitalWrite(LED, LOW);
+            
+            // Robot indicates its chosen move and waits for counter to drop
+            strip.setPixelColor(robotMove, neoPixelColour[playerColour[robot]]);
+            strip.show();
+          }
+          else {
+            
+            // it is still the robot's go
+            // Has the counter been dropped into the robot's chosen column?
+            if (c != robotMove) {
+              strcpy(screen[0], "Cheat!");
+              updateScreen();
             }
-          }
-          strcpy(screen[0], "Your go:");
-          updateScreen();
-        }
-      }
-    }
+            else {
+              // Clear the led indicating the robot's move
+              strip.setPixelColor(robotMove, 0);
+              strip.show();
+              
+              // Humans's turn
+              whosTurn = human;
+              strcpy(screen[0], "Your go:");
+              updateScreen();
+            }
+          }
+        }
+      }
     btns = NO_BUTTONS;
+    }
   }
 }
 
 void displayBoard(char board[]) {
-  Serial.println("0123456");
   byte i = 0;
   for(byte row = 0; row <= 5; row++) {
     for(byte col = 0; col <= 6; col++) {


void loop() {
  char c;
  byte best;
  int currentScore;
  unsigned int btnsNow = 0;
  // Read all buttons in the 7 cols x 2 rows matrix
  for (byte row=0; row<=1; row++) {
    for (byte col=0; col<=6; col++) {

      updateScreen();
    }
    else {
      
      // Figure out which colour counter has been dropped
      byte counter;
      if ((btns & 0b1111111) == col) counter = blue; else counter = yellow;
      
      // Have player colours been chosen yet?
      if (playerColour[human] == 0 && playerColour[robot] == 0) {
        // Colours have now been chosen
        playerColour[human] = counter;
        playerColour[robot] = 1 - counter;
      }
      
      // Has the correct colour token been dropped?
      if (counter != playerColour[whosTurn]) {
        strcpy(screen[0], "Cheat!");
        updateScreen();
      }
      else {
        
        // The correct colour has bee dropped. Figure out which column
        for (byte i=0; i<=6; i++) {
          strip.setPixelColor(i, 0);
          if (bit(i) == col) {
