removed unnecessary goalie stats from game report

This commit is contained in:
Jonathan Lamothe 2019-12-02 20:17:19 -05:00
parent cb5f2d7d15
commit df26e9d265
2 changed files with 26 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- Bugfix: removed quotation marks from goalie names in report
- Allow lower case player names
- Don't show players without points in game report
- Removed unnecessary goalie statistics from game report
## 0.7.0
- Shortened views to fit within 25 lines

View File

@ -129,7 +129,7 @@ gameStatsReport width s = let
in filteredPlayerReport width "GAME" criteria playerStats
++ [""]
++ goalieReport width goalieStats
++ gameGoalieReport width goalieStats
yearToDateStatsReport :: Int -> ProgState -> [String]
yearToDateStatsReport width s = let
@ -266,3 +266,27 @@ goalieReport width goalieData = let
$ overlayLast olayText
$ complexTable ([right, left] ++ repeat right)
$ header : body ++ [separator, summary]
gameGoalieReport :: Int -> [(Goalie, GoalieStats)] -> [String]
gameGoalieReport width goalieData = let
header =
[ CellText "NO."
, CellText "GOALTENDER"
, CellText " MIN"
, CellText " GA"
, CellText " AVE"
]
body = map
(\(goalie, stats) ->
[ CellText $ show (goalie^.gNumber) ++ " "
, CellText $ goalie^.gName
, CellText $ show $ stats^.gsMinsPlayed
, CellText $ show $ stats^.gsGoalsAllowed
, CellText $ showFloating $ gsAverage stats
])
goalieData
in map (centre width)
$ complexTable ([right, left] ++ repeat right)
$ header : body