Merge pull request #34 from mtlstats/lifetime-report
generate lifetime report
This commit is contained in:
commit
9288d885cd
|
@ -43,6 +43,8 @@ report width s
|
||||||
++ gameStatsReport width s
|
++ gameStatsReport width s
|
||||||
++ [""]
|
++ [""]
|
||||||
++ yearToDateStatsReport width s
|
++ yearToDateStatsReport width s
|
||||||
|
++ [""]
|
||||||
|
++ lifetimeStatsReport width s
|
||||||
|
|
||||||
standingsReport :: Int -> ProgState -> [String]
|
standingsReport :: Int -> ProgState -> [String]
|
||||||
standingsReport width s = fromMaybe [] $ do
|
standingsReport width s = fromMaybe [] $ do
|
||||||
|
@ -103,6 +105,10 @@ yearToDateStatsReport width s = playerReport width "YEAR TO DATE" $
|
||||||
map (\p -> (p, p^.pYtd)) $
|
map (\p -> (p, p^.pYtd)) $
|
||||||
filter playerIsActive $ s^.database.dbPlayers
|
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 :: GameState -> String
|
||||||
gameDate gs = fromMaybe "" $ do
|
gameDate gs = fromMaybe "" $ do
|
||||||
year <- show <$> gs^.gameYear
|
year <- show <$> gs^.gameYear
|
||||||
|
|
Loading…
Reference in New Issue
Block a user