aboutsummaryrefslogtreecommitdiff
path: root/src/Update/Update.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-15 20:15:19 +0100
committerJoris Guyonvarch2015-03-15 20:16:14 +0100
commitd5ec91d4d01db6f4d476522d5b14e116435ebb7d (patch)
tree76154fddf12254db1488e17752c41530ef8f6095 /src/Update/Update.elm
parentce6775641639943a2aee00fa9c2d684aa434bc21 (diff)
Displaying the last score in elm graphics instead of in helm html
Diffstat (limited to 'src/Update/Update.elm')
-rw-r--r--src/Update/Update.elm7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Update/Update.elm b/src/Update/Update.elm
index 2183d97..2be00b0 100644
--- a/src/Update/Update.elm
+++ b/src/Update/Update.elm
@@ -30,15 +30,14 @@ update input game =
| time <- 0
, currentScore <- 0
, cloud <- initCloud
- , rounds <- game.rounds `List.append` [Round game.time game.currentScore]
+ , rounds <- (Round game.time game.currentScore) :: game.rounds
}
else
- let newTime = game.time + input.delta
- newPlayer = playerStep input.delta game.boardSize input.dir (newKeyCode game.keysDown input.inputKeysDown) game.player
+ 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
in
{ game
- | time <- newTime
+ | time <- game.time + input.delta
, keysDown <- input.inputKeysDown
, currentScore <- game.currentScore + addScore
, player <- newPlayer