code: private void updateNeigbor(Tile tile, Tile neighbor)
      {
          final String group = mapGroup.getGroup(tile);
          final String neighborGroup = mapGroup.getGroup(neighbor);
          final Circuit circuit = getCircuitOverTransition(extractor.getCircuit(neighbor), neighbor);
          if (group.equals(neighborGroup))
          {
              updateTile(tile, neighbor, circuit);
          }
          else if (neighborGroup.equals(circuit.getIn()))
          {
              updateTile(neighbor, neighbor, circuit);
          }
      }
docs: Update neighbor.
  
  @param tile The tile reference.
  @param neighbor The neighbor reference.