aboutsummaryrefslogtreecommitdiff
path: root/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/View')
-rw-r--r--src/View/Game.elm18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/View/Game.elm b/src/View/Game.elm
index 2651f8d..2bef2ae 100644
--- a/src/View/Game.elm
+++ b/src/View/Game.elm
@@ -22,7 +22,7 @@ import View.Round exposing (roundView)
renderGame : Game -> Html
renderGame game =
- let renderPoints config = List.map (renderPoint game.boardSize game.time config) (game.cloud.points config)
+ let renderPoints config = List.map (renderPoint game.boardSize game.elapsedTime config) (game.cloud.points config)
in svg
[ width "100%"
, height "100%"
@@ -30,10 +30,10 @@ renderGame game =
, viewBox ("0 0 " ++ (toString game.boardSize.x) ++ " " ++ (toString (game.boardSize.y + headerHeight)))
]
[ renderBoard game.currentScore
- , renderPlayer game.boardSize game.player
+ , renderPlayer game.boardSize game.player (getPlayerSize game.currentScore)
, g [] (renderPoints White)
, g [] (renderPoints Black)
- , renderScore game.boardSize game.time game.rounds game.currentScore
+ , renderScore game.boardSize game.elapsedTime game.rounds game.currentScore
, hideNewPoints game.boardSize
, renderHeader game
]
@@ -107,8 +107,8 @@ renderBoard currentScore =
]
[]
-renderPlayer : Vec2 -> Player -> Svg
-renderPlayer boardSize player =
+renderPlayer : Vec2 -> Player -> Float -> Svg
+renderPlayer boardSize player playerSize =
renderCircle boardSize player.pos playerSize (playerColor player.config)
playerColor : Config -> String
@@ -118,8 +118,8 @@ playerColor config =
Black -> "#0E1121"
renderPoint : Vec2 -> Float -> Config -> Point -> Svg
-renderPoint boardSize time config point =
- let pos = pointMove point time
+renderPoint boardSize elapsedTime config point =
+ let pos = pointMove point elapsedTime
in renderCircle boardSize pos pointSize (playerColor config)
pointColor : Config -> String
@@ -139,13 +139,13 @@ renderCircle boardSize pos size color =
[]
renderScore : Vec2 -> Time -> List Round -> Int -> Svg
-renderScore boardSize currentRoundTime rounds score =
+renderScore boardSize elapsedTime rounds score =
let scorePos =
{ x = 0.0
, y = boardSize.y / 2 - 35
}
scoreText = "L" ++ (toString << currentLevelNumber <| score) ++ " - " ++ (toString score)
- in if currentRoundTime < 5000
+ in if elapsedTime < 5000
then
case List.head rounds of
Just round ->