+nonDetGameSimulation :: Int -> Games -> Dice -> Winners -> Winners
+nonDetGameSimulation winThreshold games0 dice winners0
+ -- | trace ((show games0) ++ "; " ++ (show winners0)) False = undefined
+ -- | trace (show winners0) False = undefined
+ | MS.null games0 = winners0
+ | otherwise = nonDetGameSimulation winThreshold games dice winners
+ where games' = nonDetGameStep games0 dice
+ (winGames, games) = MS.partition (finished winThreshold) games'
+ p1Wins = MS.size $ MS.filter (\g -> current g == Player2) winGames
+ p2Wins = MS.size $ MS.filter (\g -> current g == Player1) winGames
+ winners = MS.insertMany Player2 p2Wins $ MS.insertMany Player1 p1Wins winners0