Fix number of players for KoiKoi game to 2 on the type level

This commit is contained in:
Tissevert 2019-08-24 22:07:34 +02:00
parent ffede0b4c9
commit 9e31c6777d

View file

@ -49,8 +49,8 @@ play move game@(Game {river, step}) =
where
canCatch card1 card2 = flower card1 == flower card2 && river `contains` card2
new :: MonadIO m => [PlayerID] -> Mode -> m Game
new playersList mode = do
new :: MonadIO m => (PlayerID, PlayerID) -> Mode -> m Game
new (playerA, playerB) mode = do
playing <- Player.random players
Round.deal $ Game {
mode
@ -67,4 +67,4 @@ new playersList mode = do
, rounds = []
}
where
players = Player.players playersList
players = Player.players [playerA, playerB]