diff options
Diffstat (limited to 'Fallen/Point.hs')
-rw-r--r-- | Fallen/Point.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Fallen/Point.hs b/Fallen/Point.hs index 321f3b0..0dec4bc 100644 --- a/Fallen/Point.hs +++ b/Fallen/Point.hs | |||
@@ -34,10 +34,10 @@ module Fallen.Point | |||
34 | West -> East | 34 | West -> East |
35 | 35 | ||
36 | -- randomPoint :: Int -> Int -> Int -> Int -> IO Point | 36 | -- randomPoint :: Int -> Int -> Int -> Int -> IO Point |
37 | randomPoint minX minY maxX maxY rg = do | 37 | randomPoint minX minY maxX maxY = do |
38 | let (x,rg1) = randomR (minX, maxX) rg :: (Int,StdGen) | 38 | x <- randomRIO (minX, maxX) |
39 | let (y,rg2) = randomR (minY, maxY) rg1 :: (Int,StdGen) | 39 | y <- randomRIO (minY, maxY) |
40 | ((x,y),rg2) | 40 | return (x,y) |
41 | 41 | ||
42 | -- dirToPoint :: Point -> Point -> [Direction] | 42 | -- dirToPoint :: Point -> Point -> [Direction] |
43 | dirToPoint p1 p2 = horizDirToPoint p1 p2 ++ vertDirToPoint p1 p2 where | 43 | dirToPoint p1 p2 = horizDirToPoint p1 p2 ++ vertDirToPoint p1 p2 where |