Location newLocation = HexUtil.getNeighborLocation(pivotTile.getLocation(), numRotations);
Location origLocation = pivotTile.getLocation();
numRotations = numRotations + 3 - directionToPivot;
Rotation tileRotation = firstTile.getRotation().rotateBy(numRotations);
TilePlacement previousTilePlacement = new TilePlacement(firstTile.getTile(), newLocation, tileRotation);
tiles.add(previousTilePlacement);
// this part almost the same as reverser
for (int i=1; i<subPathTiles.size(); i++) {
TilePlacement currentTile = subPathTiles.get(i);
newLocation = findOtherOutgoingLocation(previousTilePlacement, origLocation);
Rotation tileRotation1 = currentTile.getRotation().rotateBy(numRotations);
TilePlacement currentTilePlacement = new TilePlacement(currentTile.getTile(), newLocation, tileRotation1);
assert fits(currentTilePlacement, previousTilePlacement) :
" current=" + currentTilePlacement +" (" + i +") did not fit with " + previousTilePlacement
+ " when swapping " + subPath + " at pivot = "+ pivotTile + " with primColor = " + primaryColor
+ " The outgoing locations from curent are " + currentTilePlacement.getOutgoingPathLocations(primaryColor);