don't hang on goalie selection
This commit is contained in:
parent
c6c461f584
commit
405ca1c5c7
@ -99,7 +99,10 @@ setGameGoalie gid s = fromMaybe s $ do
|
|||||||
& gYtd %~ updateStats
|
& gYtd %~ updateStats
|
||||||
& gLifetime %~ updateStats
|
& gLifetime %~ updateStats
|
||||||
|
|
||||||
|
updateGameState gs = gs
|
||||||
|
& gameGoalieStats %~ updateMap gid newGoalieStats updateStats
|
||||||
|
& gameGoalieAssigned .~ True
|
||||||
|
|
||||||
Just $ s
|
Just $ s
|
||||||
& database.dbGoalies %~ modifyNth gid updateGoalie
|
& database.dbGoalies %~ modifyNth gid updateGoalie
|
||||||
& progMode.gameStateL.gameGoalieStats
|
& progMode.gameStateL %~ updateGameState
|
||||||
%~ updateMap gid newGoalieStats updateStats
|
|
||||||
|
@ -245,7 +245,10 @@ setGameGoalieSpec = describe "setGameGoalie" $ let
|
|||||||
[ ( "game stats", game, goalieStats gWins gLosses gTies )
|
[ ( "game stats", game, goalieStats gWins gLosses gTies )
|
||||||
, ( "YTD stats", ytd, goalieStats ytdWins ytdLosses ytdTies )
|
, ( "YTD stats", ytd, goalieStats ytdWins ytdLosses ytdTies )
|
||||||
, ( "lifetime stats", lifetime, goalieStats ltWins ltLosses ltTies )
|
, ( "lifetime stats", lifetime, goalieStats ltWins ltLosses ltTies )
|
||||||
])
|
]
|
||||||
|
|
||||||
|
it "should set the gameGoalieAssigned flag" $
|
||||||
|
progState^.progMode.gameStateL.gameGoalieAssigned `shouldBe` True)
|
||||||
[ ( "checking Bob", 0, bobData )
|
[ ( "checking Bob", 0, bobData )
|
||||||
, ( "checking Joe", 1, joeData )
|
, ( "checking Joe", 1, joeData )
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user