Is there a way to call a function only at and of multiple recurency?
I have a code like this
private function _markTile(tile:Tile):void {
if (tile.mark()) return;
var array:Array=new Array();
array.push(_getNeighbourToLeft(tile),_getNeighbourAbove(tile),_getNeighbourToRight(tile),_getNeighbourBelow(tile))
for each (var element:Tile in array) if (getQualifiedClassName(tile)==getQualifiedClassName(element)) _markTile(element);
}
I want to remove marked tiles at once…