#define MAX_CARDS
The maximum number of cards in a player's hand.
Definition: constants.h:12
EXPORT int team_addPlayer(struct Team *team, struct Player *player)
Adds a player to a team.
Definition: team.c:57
struct Player * players[MAX_TEAM_PLAYERS]
Definition: team.h:48
EXPORT struct Player * team_createPlayer(const char *name, const int isHuman)
Creates a player.
Definition: team.c:16
int score
Definition: team.h:30
EXPORT int team_deleteTeam(struct Team **team)
Deletes a team and sets the pointer to NULL.
Definition: team.c:93
int isHuman
Definition: team.h:31
EXPORT int team_updatePlayersScore(struct Team *team)
Updates all players scores, assigning team score to them.
Definition: team.c:153
struct Card * hand[MAX_CARDS]
Definition: team.h:29
Player structure.
Definition: team.h:27
Card structure, to keep suit and value.
Definition: deck.h:24
EXPORT int team_addCard(struct Player *player, struct Card *card)
Passes a card to a player. The function doesn't check if the card has valid value and valid suit...
Definition: team.c:120
EXPORT int team_removePlayer(struct Team *team, const struct Player *player)
Removes a player from a team.
Definition: team.c:77
EXPORT struct Team * team_createTeam()
Creates a team.
Definition: team.c:42
EXPORT int team_hasCards(const struct Player *player)
Checks if a player has any card.
Definition: team.c:141
In this file are located the definitions of Card and Deck structures, as well as helper functions...
int score
Definition: team.h:47
char * name
Definition: team.h:28
EXPORT int team_deletePlayer(struct Player **player)
Deletes a player and sets the pointer to NULL.
Definition: team.c:106
Team structure.
Definition: team.h:46
#define MAX_TEAM_PLAYERS
The maximum number of players in a team.
Definition: constants.h:17