Add laser run past rooms

This commit is contained in:
2026-03-13 10:02:29 +00:00
parent be72daf6d5
commit f28a59e7a3
3 changed files with 94 additions and 38 deletions
+5
View File
@@ -144,3 +144,8 @@ randFromPair :: RandomGen g => Float -> (a,a) -> State g a
randFromPair x (l,r) = do
y <- state $ randomR (0,1)
if x < y then return l else return r
shufflePair :: RandomGen g => (a,a) -> State g (a,a)
shufflePair (x,y) = do
v <- state $ randomR (0::Float,1)
if v > 0.5 then return (x,y) else return (y,x)