aboutsummaryrefslogtreecommitdiff
path: root/src/Cloud.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-04 23:27:59 +0100
committerJoris Guyonvarch2015-03-05 00:27:32 +0100
commit4d007f6802246c6411a2838e68e957c2b4d56d3d (patch)
tree70519a5a2d6825bf2b64f6a8950a003b2ff4f150 /src/Cloud.elm
parentd37a301ed39bac823e0f2223b8d229b417e128c7 (diff)
Adapt the game to elm version 0.14.1
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 =