aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt2020-07-31 21:05:38 +0200
committerJasper Van der Jeugt2020-07-31 21:05:38 +0200
commitfd04d589936135f67c3362e664c896f6bf76e075 (patch)
treef0eebe186de13cabd73094d3ef805069f00c1d01
parent5a1586d0a5745da547254558e8f1de8e2a94c469 (diff)
Bump
-rw-r--r--client/src/Client.elm4
-rw-r--r--server/lib/Cafp/Game.hs6
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