Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Remove initRealEstate from Monopoly.hs module declaration because the…
Browse files Browse the repository at this point in the history
… function moved to MonopolyInit.hs.
  • Loading branch information
kalbfled committed Jul 17, 2019
1 parent 5b4c77f commit 2408b72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Monopoly.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module Monopoly (
getPurchasePrice,
getRentDue,
incomeTax,
initRealEstate,
jail,
justVisiting,
luxuryTax,
Expand Down Expand Up @@ -135,7 +134,7 @@ winnerIndex :: Players -> Maybe Int
-- Return the index of the winner, if any. Otherwise, return Nothing. There is a winner if only one player has non-negative money.
winnerIndex players
| solvent_count == 1 = Just (head solvent_players) -- We have a winner.
| solvent_count > 1 = Nothing -- Multiple players are still in the game; no winner yet.
| solvent_count > 1 = Nothing -- Multiple players are still in the game; no winner yet.
where solvent_players = List.findIndices (\(_, money, _) -> money >= 0) players
solvent_count = length solvent_players

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ improvements to the former first as long as room for improvements remains.

## Turns Limit
Without the posibility of players making deals, [Monopoly games can last indefinitely](https://www.informs-sim.org/wsc09papers/036.pdf).
To mitigate this infinite loop condition, a game is abondoned when there is no winner after each player has taken 20,000 turns. The
To mitigate this infinite loop condition, a game is abandoned when there is no winner after each player has taken 20,000 turns. The
simulation continues until completing the user-specified number of games.

0 comments on commit 2408b72

Please sign in to comment.