From 1cf6bc1ad9209e4f3f2fcbc129f2577e74e94c99 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 30 Dec 2015 01:03:47 +0100 Subject: Upgrade to elm 0.16.0 --- src/Update/Update.elm | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/Update/Update.elm') diff --git a/src/Update/Update.elm b/src/Update/Update.elm index e173aaa..9dc737f 100644 --- a/src/Update/Update.elm +++ b/src/Update/Update.elm @@ -3,8 +3,7 @@ module Update.Update ) where import List -import Keyboard exposing (KeyCode) -import Char exposing (fromCode, toCode) +import Char exposing (fromCode, toCode, KeyCode) import Maybe import Set import Set exposing (Set) @@ -29,22 +28,22 @@ update input game = in if(playerPointsCollision game.time game.player hostilePoints) then { game - | time <- 0 - , currentScore <- 0 - , cloud <- initCloud - , rounds <- (Round game.time game.currentScore) :: game.rounds + | time = 0 + , currentScore = 0 + , cloud = initCloud + , rounds = (Round game.time game.currentScore) :: game.rounds } else let newPlayer = playerStep input.delta game.boardSize input.dir (newKeyCode game.keysDown input.inputKeysDown) game.player (newCloud, addScore, newSeed) = cloudUpdate game.time game.boardSize game.seed newPlayer game.cloud game.currentScore in { game - | time <- game.time + input.delta - , keysDown <- input.inputKeysDown - , currentScore <- game.currentScore + addScore - , player <- newPlayer - , cloud <- newCloud - , seed <- newSeed + | time = game.time + input.delta + , keysDown = input.inputKeysDown + , currentScore = game.currentScore + addScore + , player = newPlayer + , cloud = newCloud + , seed = newSeed } playerStep : Float -> Vec2 -> Vec2 -> (KeyCode -> Bool) -> Player -> Player -- cgit v1.2.3