Add laser run past rooms
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user