   }
 }
 
+void catchInput()
+{
+  for (int i = 0; i < NUMBER_OF_PLAYERS; i++)
+  {
+    players[i].catchInput();
+  }
+}
+
+int frame;
+
 void setup()
 {
+  frame = 0;
   ledtable.begin();
   ledtable.fill(BACKGROUND_COLOR);
+  //ledtable.brightness(50);
   setupPlayers();
+}
+
+void wait()
+{
+  int now = millis();
+  int stop = millis() + TIME_BETWEEN_ROUNDS_MILLIS;
+  int offset;
+  if (stop < now) 
+  {
+    offset = - 2 * TIME_BETWEEN_ROUNDS_MILLIS;
+    now -= offset;
+    stop -= offset;
+  } else  {
+    offset = 0;
+  }
+  for (int i = millis(); i + offset < stop; i = millis())
+  {
+    catchInput();
+  }
 }
 
 void loop()
 {
   updatePlayers();
   ledtable.show();
-  delay(300);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
+  wait();
+  frame++;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+

    ledtable.fill(last_x, last_y, transparent(BACKGROUND_COLOR, walked % STEPS_TO_HOLE ? 150 : 0));
    ledtable.fill(x, y, transparent(color(), 200));
  }
};

class Effect
{
  
}


Player players[8] = { Player(), Player(), Player(), Player(), Player(), Player(), Player(), Player() };


  const int rightPin()
  {
    return playerPins[index][1];
  }

  bool leftPressed()
  {
    return digitalRead(leftPin()) == LOW;
  }

  bool rightPressed()
  {
    return digitalRead(rightPin()) == LOW;
  }

  void setup()
