diff options
author | Joris | 2016-10-02 15:34:27 +0200 |
---|---|---|
committer | Joris | 2016-10-02 15:34:27 +0200 |
commit | 3a1cbfe23a3d06c3c30828c623a089868cff0670 (patch) | |
tree | 2c81f1f218f92656fdb2026ffedb423d9d06b76a /src/View.elm | |
parent | fbab0129f902bf2c3ef07c92deb7674384c18424 (diff) |
Add saw-tooth move and multiple moves per level
Diffstat (limited to 'src/View.elm')
-rw-r--r-- | src/View.elm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/View.elm b/src/View.elm index 822c2d2..d6265f6 100644 --- a/src/View.elm +++ b/src/View.elm @@ -6,6 +6,7 @@ import Html exposing (Html) import Svg exposing (..) import Svg.Attributes exposing (..) import List +import Color as Color exposing (Color) import Time exposing (Time) @@ -16,7 +17,6 @@ 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) @@ -103,10 +103,15 @@ renderBoard currentScore = [ y (toString headerHeight) , width "100%" , height "100%" - , fill (htmlOutput (progressiveColor currentScore)) + , fill (colorRgba (progressiveColor currentScore)) ] [] +colorRgba : Color -> String +colorRgba color = + let c = Color.toRgb color + in "rgba(" ++ (toString c.red) ++ ", " ++ (toString c.green) ++ ", " ++ (toString c.blue) ++ "," ++ (toString c.alpha) ++ ")" + renderPlayer : Vec2 -> Player -> Float -> Svg msg renderPlayer boardSize player playerSize = renderCircle boardSize player.pos playerSize (playerColor player.config) |