implemented goalieName
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user