Anomaly Game Mechanic

images (36)
I want to make game like Nine Floors. So, basically its a anomaly game that u start from floor number 9 and must go down to first floor, if there is anomaly in the floor u must turn back and if there isn’t u can go ahead. If there is anomaly and u not turn back u will back to floor number 9 again.

How the map (the floor) works in this game? it’s a bit confusing for a newbie like me