aboutsummaryrefslogtreecommitdiff
path: root/src/View/Page.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/View/Page.elm')
-rw-r--r--src/View/Page.elm11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/View/Page.elm b/src/View/Page.elm
index 6d6c54d..4dd54b5 100644
--- a/src/View/Page.elm
+++ b/src/View/Page.elm
@@ -20,13 +20,22 @@ pageView game =
[ h1 [] [ text "cAtchVoid" ]
, div
[ id "game" ]
- [ fromElement << gameView <| game ]
+ [ fromElement <| gameView game ]
, p
[]
[ text "Catch the points of your color, avoid the other points." ]
, p
[]
[ text "Use the arrow keys to move and 'e' to change your color." ]
+ , ( if List.isEmpty game.scores
+ then
+ div [ class "bestScore" ] []
+ else
+ let bestScore = List.maximum game.scores
+ in p
+ [ class "bestScore isDefined" ]
+ [ text <| "Best score: " ++ (toString bestScore) ]
+ )
, a
[ href "https://github.com/guyonvarch/catchvoid" ]
[ img