diff options
| -rwxr-xr-x[-rw-r--r--] | Assets/Cards.png | bin | 3119 -> 3119 bytes | |||
| -rwxr-xr-x[-rw-r--r--] | CMakeLists.txt | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | src/game.c | 6 |
3 files changed, 4 insertions, 2 deletions
diff --git a/Assets/Cards.png b/Assets/Cards.png Binary files differindex 58fb882..58fb882 100644..100755 --- a/Assets/Cards.png +++ b/Assets/Cards.png diff --git a/CMakeLists.txt b/CMakeLists.txt index fbe6b93..fbe6b93 100644..100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt diff --git a/src/game.c b/src/game.c index 39f4aad..f23d74f 100644..100755 --- a/src/game.c +++ b/src/game.c @@ -36,6 +36,7 @@ typedef struct Card { typedef struct Game { int turn; + bool gameWon; Card deck[DECK_SIZE]; Card hands[MAX_NUM_PLAYERS][DECK_SIZE]; @@ -227,7 +228,9 @@ void FlipCards() { static inline bool CanPlayCard(const Card* card) { Card topCard = game.stack[game.cardsInStack-1]; - return topCard.face == card->face + return card->face == 7 + || card->face == 10 + || topCard.face == card->face || topCard.suite == card->suite; } @@ -285,7 +288,6 @@ static inline int NextPlayer() { //Make next player draw 5 void AceOfSpadesEffect() { - puts("Here!"); for (int i = 0; i < 5; i++) Deal(NextPlayer()); NextTurn(); } |
