From d37a301ed39bac823e0f2223b8d229b417e128c7 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Wed, 8 Oct 2014 22:13:41 +0200 Subject: Adding a power to change the player color that reverse points to catch and points to avoid --- src/Cloud.elm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/Cloud.elm') diff --git a/src/Cloud.elm b/src/Cloud.elm index 081862c..99a4949 100644 --- a/src/Cloud.elm +++ b/src/Cloud.elm @@ -2,20 +2,22 @@ module Cloud where import Point (..) import Player (..) +import Config (..) import Geometry (distance) type Cloud = - { greenPoints : [Point] - , redPoints : [Point] + { points : Config -> [Point] , spawn : Float , lastSpawn : Float } initCloud : Cloud initCloud = - let spawn = 200 - in { greenPoints = [] - , redPoints = [] + let spawn = 100 + in { points config = + case config of + White -> [] + Black -> [] , spawn = spawn , lastSpawn = -spawn } -- cgit v1.2.3