I was just looking at this some more, and I just added a section of code to the "isValidPlacement()" function so that the temp tiles are ignored. See code below :-) It might be a little slower because we have to determine if they're in the temp-tiles array, but it seems to be working... Your way sounds more efficient, but I'm not sure it matters too much?
TileBoardGenIterator localIter = new TileBoardGenIterator(iter);
// iterate left and check if features match
Tile left = localIter.leftCopy().current();
Tile top = localIter.upCopy().current();
Tile right = localIter.rightCopy().current();
Tile bottom = localIter.downCopy().current();
// we want to make sure the tiles we're looking at in the adjacent
// squares are not temp. tiles. This could lead to illeigal "feature
// bindings" and this function returning false unnecessarily.
if (tempTileLocations_.contains(localIter.leftCopy().getLocation()))
left = null;
if (tempTileLocations_.contains(localIter.rightCopy().getLocation()))
right = null;
if (tempTileLocations_.contains(localIter.upCopy().getLocation()))
top = null;
if (tempTileLocations_.contains(localIter.downCopy().getLocation()))
bottom = null;
if (left != null && !tileFeatureBindings_.featuresBind(left
.featureIdentifierInRegion(Region.Right), tile
.featureIdentifierInRegion(Region.Left)))
return false;
// iterate up and check if features match
if (top != null && !tileFeatureBindings_.featuresBind(top
.featureIdentifierInRegion(Region.Bottom), tile
.featureIdentifierInRegion(Region.Top)))
return false;
// iterate right and check if features match
if (right != null && !tileFeatureBindings_.featuresBind(right
.featureIdentifierInRegion(Region.Left), tile
.featureIdentifierInRegion(Region.Right)))
return false;
// iterate down and check if features match
if (bottom != null && !tileFeatureBindings_.featuresBind(bottom
.featureIdentifierInRegion(Region.Top), tile
.featureIdentifierInRegion(Region.Bottom)))
return false;
// make sure at least one of the adjacent tiles exists
if (left == null && top == null && right == null && bottom == null)
return false;