Commit 7e670d46 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Check that a card has not been played yet

parent 0d8ac693
Pipeline #174634 passed with stages
in 31 minutes and 7 seconds
......@@ -1753,6 +1753,13 @@ game_check_card_full_aux (const TarotGameHandle * game, TarotCard played,
int ok = (game_get_step (game) == TAROT_TRICKS);
TarotPlayer next = tricks_next (&(game->tricks));
const TarotTrickHandle *current = &(game->tricks.tricks[i_current]);
size_t played_in_trick, played_at_position;
if (tricks_locate
(&(game->tricks), played, &played_in_trick, &played_at_position) == 0)
{
/* This card has already been played */
ok = 0;
}
if (ok && hands_known (&(game->hands), next))
{
const TarotHand *next_hand = &(game->hands.hands[next]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment