/** Returns the distance at which objects should spawn. */ public float getSpawnDistance() { return Math.min(8 * player.getSpeed(), Tunnel.GRID_LENGTH * Tunnel.GSQ_LEN / 2); }