diff options
Diffstat (limited to 'src/View')
-rw-r--r-- | src/View/Game.elm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/View/Game.elm b/src/View/Game.elm index af7c8de..f99369d 100644 --- a/src/View/Game.elm +++ b/src/View/Game.elm @@ -15,6 +15,8 @@ import Model.Game exposing (Game) import Model.Point exposing (..) import Model.Config exposing (..) import Model.Round exposing (..) +import Model.Level exposing (..) +import Model.Color exposing (htmlOutput) import View.Round exposing (roundView) @@ -27,7 +29,7 @@ renderGame game = , Svg.Attributes.style ("background-color: " ++ backgroundColor ++ ";") , viewBox ("0 0 " ++ (toString game.boardSize.x) ++ " " ++ (toString (game.boardSize.y + headerHeight))) ] - [ renderBoard + [ renderBoard game.currentScore , renderPlayer game.boardSize game.player , g [] (renderPoints White) , g [] (renderPoints Black) @@ -95,13 +97,13 @@ renderHeader game = backgroundColor : String backgroundColor = "#1B203F" -renderBoard : Svg -renderBoard = +renderBoard : Int -> Svg +renderBoard currentScore = rect [ y (toString headerHeight) , width "100%" , height "100%" - , fill "#677BF4" + , fill (htmlOutput (progressiveColor currentScore)) ] [] @@ -170,7 +172,7 @@ renderText boardSize pos content = hideNewPoints : Vec2 -> Svg hideNewPoints boardSize = let size = - (pointSpawnDist boardSize) + pointSize - (Basics.max boardSize.x boardSize.y) / 2 + (pointAwayDist boardSize) + pointSize - (Basics.max boardSize.x boardSize.y) / 2 |> toString in g [] |