Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
tarot
Commits
7e670d46
Commit
7e670d46
authored
Oct 11, 2019
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/libtarot/game/tarot/game_private_impl.h
View file @
7e670d46
...
...
@@ -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
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment