aboutsummaryrefslogtreecommitdiff
path: root/src/View/Round.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-15 20:15:19 +0100
committerJoris Guyonvarch2015-03-15 20:16:14 +0100
commitd5ec91d4d01db6f4d476522d5b14e116435ebb7d (patch)
tree76154fddf12254db1488e17752c41530ef8f6095 /src/View/Round.elm
parentce6775641639943a2aee00fa9c2d684aa434bc21 (diff)
Displaying the last score in elm graphics instead of in helm html
Diffstat (limited to 'src/View/Round.elm')
-rw-r--r--src/View/Round.elm14
1 files changed, 14 insertions, 0 deletions
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