aboutsummaryrefslogtreecommitdiff
path: root/src/View/Round.elm
blob: 81f4f8c515d26d8d4c22c030de2e37a2a07a8767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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