code: private void updateTile(Tile tile, Tile neighbor, Circuit circuit)
      {
          final Iterator<TileRef> iterator = getTiles(circuit).iterator();
          while (iterator.hasNext())
          {
              final TileRef newTile = iterator.next();
              if (mapGroup.getGroup(newTile).equals(mapGroup.getGroup(tile)))
              {
                  map.setTile(map.createTile(newTile.getSheet(), newTile.getNumber(), neighbor.getX(), neighbor.getY()));
                  break;
              }
          }
      }
docs: Update tile with new representation.
  
  @param tile The tile placed.
  @param neighbor The tile to update.
  @param circuit The circuit to set.