aboutsummaryrefslogtreecommitdiff
path: root/src/Cloud.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cloud.elm')
-rw-r--r--src/Cloud.elm10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Cloud.elm b/src/Cloud.elm
index 99a4949..0916bf6 100644
--- a/src/Cloud.elm
+++ b/src/Cloud.elm
@@ -1,12 +1,14 @@
module Cloud where
+import List
+
import Point (..)
import Player (..)
import Config (..)
import Geometry (distance)
-type Cloud =
- { points : Config -> [Point]
+type alias Cloud =
+ { points : Config -> List Point
, spawn : Float
, lastSpawn : Float
}
@@ -22,10 +24,10 @@ initCloud =
, lastSpawn = -spawn
}
-playerPointsCollision : Float -> Player -> [Point] -> Bool
+playerPointsCollision : Float -> Player -> List Point -> Bool
playerPointsCollision time player points =
let collision = playerPointCollision time player
- in length (filter collision points) > 0
+ in List.length (List.filter collision points) > 0
playerPointCollision : Float -> Player -> Point -> Bool
playerPointCollision time player point =