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