From 9f206ede725c3c1197336c045a5060754fc23d32 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Sat, 9 Nov 2019 00:31:12 -0500 Subject: [PATCH] generate lifetime report --- src/Mtlstats/Report.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 00976c2..cd95eed 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -43,6 +43,8 @@ report width s ++ gameStatsReport width s ++ [""] ++ yearToDateStatsReport width s + ++ [""] + ++ lifetimeStatsReport width s standingsReport :: Int -> ProgState -> [String] standingsReport width s = fromMaybe [] $ do @@ -103,6 +105,10 @@ yearToDateStatsReport width s = playerReport width "YEAR TO DATE" $ map (\p -> (p, p^.pYtd)) $ filter playerIsActive $ s^.database.dbPlayers +lifetimeStatsReport :: Int -> ProgState -> [String] +lifetimeStatsReport width s = playerReport width "LIFETIME" $ + map (\p -> (p, p^.pLifetime)) $ s^.database.dbPlayers + gameDate :: GameState -> String gameDate gs = fromMaybe "" $ do year <- show <$> gs^.gameYear