implemented goalieName

This commit is contained in:
Jonathan Lamothe
2020-01-04 11:02:58 -05:00
parent 8dcef502be
commit e077c32956
2 changed files with 28 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
-}
module Mtlstats.Helpers.Goalie (goalieDetails) where
module Mtlstats.Helpers.Goalie (goalieDetails, goalieName) where
import Lens.Micro ((^.))
@@ -46,3 +46,13 @@ goalieDetails g = let
]
in header ++ "\n" ++ body
-- | Returns the goalie name, modified if they are a rookie
goalieName :: Goalie -> String
goalieName g = let
suffix = if g^.gRookie
then "*"
else ""
in g^.gName ++ suffix