public void placeTiles() { map.clear(); undoList.clear(); bag.reset(); Cell aCell; Box aTile; for (int a = 0; a < 2 * nbrAcross; a++) for (int d = 0; d < 2 * nbrDown; d++) for (int h = 0; h < nbrHigh; h++) { aCell = cell[a][d][h]; if (aCell.tileReqd) { aTile = bag.nextTile(); aTile.visible(true); aTile.pickable(true); aTile.moveTo(aCell.x, aCell.y, aCell.z); aCell.currTile = aTile; aCell.undoTile = null; map.put(aTile, aCell); } } }
public void makeUndo() { currTile = undoTile; currTile.visible(true); undoTile = null; }
public void makeRemoved() { currTile.visible(false); undoTile = currTile; currTile = null; }