The infamous 'Left hand of an assignment must be a variable'
I'm making some kind of game where a map draws itself as a fixed number of tiles...
some tiles are destroyable, and when destroyed, they turn into another tile (basicly, the image and some parameters changes)
also, a tile can have another tile above or below
now what I'm trying to do is to destroy a tile depending on the layer we are on (above, floor or below)
so it goes like
publicvoid destroyTile(int x,int y){
tile[x][y].getTileOnLayer(currentLayer) = tile[x][y].getTileOnLayer(currentLayer).getDestroyedTile();
//getTileOnLayer returns a Tile object, depending on the layer we send it
}
and yes, the left-hand of an assignment must be a variable
I thought about making a setTile method in the Tile class...the result would only be this = something, which makes the same problem...
what could I do

