Terrain

added adaptive staircase code.
not quite finished