diff options
-rw-r--r-- | client/src/Client.elm | 4 | ||||
-rw-r--r-- | server/lib/Cafp/Game.hs | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/client/src/Client.elm b/client/src/Client.elm index 9639ec9..aebeb8f 100644 --- a/client/src/Client.elm +++ b/client/src/Client.elm @@ -83,8 +83,10 @@ view model = case model of ] [Html.text "Update name"] ] + , Html.h1 [] [Html.text "Table"] + , viewTable game + , Html.h1 [] [Html.text "Your cards"] ] ++ - [viewTable game] ++ (List.map (\c -> whiteCard game.cards c (cardIsSelected game c)) game.view.hand) diff --git a/server/lib/Cafp/Game.hs b/server/lib/Cafp/Game.hs index e170370..ead1445 100644 --- a/server/lib/Cafp/Game.hs +++ b/server/lib/Cafp/Game.hs @@ -57,14 +57,14 @@ makeLenses ''Game newGame :: Cards -> IO Game newGame cards = do - black <- newDeck BlackCard $ cardsBlack cards + black <- fmap InfiniteDeck.pop . newDeck BlackCard $ cardsBlack cards white <- newDeck WhiteCard $ cardsWhite cards pure Game { _gameCards = cards - , _gameBlack = black + , _gameBlack = snd black , _gameWhite = white , _gamePlayers = HMS.empty - , _gameTable = TableProposing (BlackCard 0) HMS.empty + , _gameTable = TableProposing (fst black) HMS.empty , _gameNextPlayerId = 1 } where |