Quaternity
|
This file defines the structs for a card, player and a game state, plus a state initialize and copy function header. More...
#include <vector>
Go to the source code of this file.
Classes | |
struct | Card |
The information connected to a card. More... | |
struct | Player |
The information connected to a player. More... | |
struct | State |
The complete game state. More... | |
Functions | |
State | init_state (const Settings &settings) |
Initialize the starting state corresponding to the given settings. More... | |
State | copy_state (const State &state) |
Copy the old state to a new state. More... | |
int | info_num_quartets (const State &state, int player) |
Get the number of quartets the given player has. More... | |
int | info_num_cards (const Settings &settings, const State &state, int player) |
Get the number of cards the player has without counting the cards from quartets, so the actual number of cards the player has in its hands. More... | |
This file defines the structs for a card, player and a game state, plus a state initialize and copy function header.
Definition in file state.h.
Copy the old state to a new state.
Definition at line 96 of file state.cpp.
Get the number of cards the player has without counting the cards from quartets, so the actual number of cards the player has in its hands.
Definition at line 113 of file state.cpp.
int info_num_quartets | ( | const State & | state, |
int | player | ||
) |
Initialize the starting state corresponding to the given settings.
The cards and players are defined by their respective functions. The zero'th player starts the game (has the first turn).
Definition at line 58 of file state.cpp.