From 4d007f6802246c6411a2838e68e957c2b4d56d3d Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Wed, 4 Mar 2015 23:27:59 +0100 Subject: Adapt the game to elm version 0.14.1 --- src/Cloud.elm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Cloud.elm') 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 = -- cgit v1.2.3