removed (redundant) gsGoalsAgainst
This commit is contained in:
@@ -117,14 +117,12 @@ resetYtdSpec = describe "resetYtd" $
|
||||
ytd ^. gsGames `shouldBe` 0
|
||||
ytd ^. gsMinsPlayed `shouldBe` 0
|
||||
ytd ^. gsGoalsAllowed `shouldBe` 0
|
||||
ytd ^. gsGoalsAgainst `shouldBe` 0
|
||||
ytd ^. gsWins `shouldBe` 0
|
||||
ytd ^. gsLosses `shouldBe` 0
|
||||
ytd ^. gsTies `shouldBe` 0
|
||||
lt ^. gsGames `shouldNotBe` 0
|
||||
lt ^. gsMinsPlayed `shouldNotBe` 0
|
||||
lt ^. gsGoalsAllowed `shouldNotBe` 0
|
||||
lt ^. gsGoalsAgainst `shouldNotBe` 0
|
||||
lt ^. gsWins `shouldNotBe` 0
|
||||
lt ^. gsLosses `shouldNotBe` 0
|
||||
lt ^. gsTies `shouldNotBe` 0) $
|
||||
@@ -647,7 +645,6 @@ makeGoalieStats = GoalieStats
|
||||
<*> makeNum
|
||||
<*> makeNum
|
||||
<*> makeNum
|
||||
<*> makeNum
|
||||
|
||||
makeNum :: IO Int
|
||||
makeNum = randomRIO (1, 10)
|
||||
|
||||
@@ -241,20 +241,18 @@ goalieStats n = newGoalieStats
|
||||
& gsGames .~ n
|
||||
& gsMinsPlayed .~ n + 1
|
||||
& gsGoalsAllowed .~ n + 2
|
||||
& gsGoalsAgainst .~ n + 3
|
||||
& gsWins .~ n + 4
|
||||
& gsLosses .~ n + 5
|
||||
& gsTies .~ n + 6
|
||||
& gsWins .~ n + 3
|
||||
& gsLosses .~ n + 4
|
||||
& gsTies .~ n + 5
|
||||
|
||||
goalieStatsJSON :: Int -> Value
|
||||
goalieStatsJSON n = Object $ HM.fromList
|
||||
[ ( "games", toJSON n )
|
||||
, ( "mins_played", toJSON $ n + 1 )
|
||||
, ( "goals_allowed", toJSON $ n + 2 )
|
||||
, ( "goals_against", toJSON $ n + 3 )
|
||||
, ( "wins", toJSON $ n + 4 )
|
||||
, ( "losses", toJSON $ n + 5 )
|
||||
, ( "ties", toJSON $ n + 6 )
|
||||
, ( "wins", toJSON $ n + 3 )
|
||||
, ( "losses", toJSON $ n + 4 )
|
||||
, ( "ties", toJSON $ n + 5 )
|
||||
]
|
||||
|
||||
gameStats :: Int -> GameStats
|
||||
|
||||
Reference in New Issue
Block a user