Simplified randomizeFloor to be more performant