From d5ec91d4d01db6f4d476522d5b14e116435ebb7d Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 15 Mar 2015 20:15:19 +0100 Subject: Displaying the last score in elm graphics instead of in helm html --- src/View/Round.elm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/View/Round.elm (limited to 'src/View/Round.elm') diff --git a/src/View/Round.elm b/src/View/Round.elm new file mode 100644 index 0000000..81f4f8c --- /dev/null +++ b/src/View/Round.elm @@ -0,0 +1,14 @@ +module View.Round + ( roundView + ) where + +import Model.Round (..) + +import View.Time (timeView) + +roundView : Round -> String +roundView round = + let score = toString round.score + hits = "hit" ++ (if round.score > 1 then "s" else "") + duration = timeView round.duration + in score ++ " " ++ hits ++ " within " ++ duration -- cgit v1.2.3