add line numbers to lifetime goalie report
This commit is contained in:
parent
d14f2ba527
commit
3a71dc1e62
|
@ -148,7 +148,7 @@ yearToDateStatsReport width s = let
|
||||||
|
|
||||||
in playerReport width "YEAR TO DATE" True False playerStats
|
in playerReport width "YEAR TO DATE" True False playerStats
|
||||||
++ [""]
|
++ [""]
|
||||||
++ goalieReport width True goalieStats
|
++ goalieReport width True False goalieStats
|
||||||
|
|
||||||
lifetimeStatsReport :: Int -> ProgState -> [String]
|
lifetimeStatsReport :: Int -> ProgState -> [String]
|
||||||
lifetimeStatsReport width s = let
|
lifetimeStatsReport width s = let
|
||||||
|
@ -163,7 +163,7 @@ lifetimeStatsReport width s = let
|
||||||
|
|
||||||
in playerReport width "LIFETIME" False True playerStats
|
in playerReport width "LIFETIME" False True playerStats
|
||||||
++ [""]
|
++ [""]
|
||||||
++ goalieReport width False goalieStats
|
++ goalieReport width False True goalieStats
|
||||||
|
|
||||||
gameDate :: GameState -> String
|
gameDate :: GameState -> String
|
||||||
gameDate gs = fromMaybe "" $ do
|
gameDate gs = fromMaybe "" $ do
|
||||||
|
@ -251,9 +251,10 @@ filteredPlayerReport width label criteria showTotals lineNumbers ps = let
|
||||||
goalieReport
|
goalieReport
|
||||||
:: Int
|
:: Int
|
||||||
-> Bool
|
-> Bool
|
||||||
|
-> Bool
|
||||||
-> [(Goalie, GoalieStats)]
|
-> [(Goalie, GoalieStats)]
|
||||||
-> [String]
|
-> [String]
|
||||||
goalieReport width showTotals goalieData = let
|
goalieReport width showTotals lineNumbers goalieData = let
|
||||||
olayText = if showTotals
|
olayText = if showTotals
|
||||||
then "GOALTENDING TOTALS"
|
then "GOALTENDING TOTALS"
|
||||||
else ""
|
else ""
|
||||||
|
@ -292,7 +293,12 @@ goalieReport width showTotals goalieData = let
|
||||||
|
|
||||||
summary = replicate 2 (CellText "") ++ rowCells tData
|
summary = replicate 2 (CellText "") ++ rowCells tData
|
||||||
|
|
||||||
in map (centre width)
|
lnOverlay = if lineNumbers
|
||||||
|
then "" : [right 2 $ show x | x <- [(1 :: Int)..]]
|
||||||
|
else repeat ""
|
||||||
|
|
||||||
|
in map (\(ln, line) -> overlay ln $ centre width line)
|
||||||
|
$ zip lnOverlay
|
||||||
$ overlayLast olayText
|
$ overlayLast olayText
|
||||||
$ complexTable ([right, left] ++ repeat right)
|
$ complexTable ([right, left] ++ repeat right)
|
||||||
$ header : body ++ if showTotals
|
$ header : body ++ if showTotals
|
||||||
|
|
Loading…
Reference in New Issue
Block a user