     return;
   }
 
-  // TODO(benkraft): figure out whether there is a connection on current
-  // selector position
   int selector_pos = getSelectorGearPosition();
   correct_positions[selector_pos] = haveConnection(
     selector_pos, gear_types, gear_orientations);


  // TODO(bhomberg): close all solenoids (??)
}





int have_won = false;

// Structure of the gears, represented as pairs that are connected.
// Orientation is as described in getOrientationAndTypeForGear.
int gear_0_connections[6][2] = {
  {2, 5}, {2, 8}, {2, 11}, {5, 8}, {5, 11}, {8, 11}};

int gear_1_connections[12][2] = {
  {0, 5}, {0, 7}, {5, 7},
  {1, 6}, {1, 11}, {6, 11},
  {2, 4}, {2, 9}, {4, 9},
  {3, 8}, {3, 10}, {8, 10}};

int gear_2_connections[9][2] = {
  {0, 4}, {0, 8}, {4, 8},
  {1, 5}, {1, 9}, {5, 9},
  {2, 6}, {2, 10}, {6, 10}};

// this runs once when the program starts
void setup() 
{
