Quaternity
Public Attributes | List of all members
State Struct Reference

The complete game state. More...

#include <state.h>

Public Attributes

int onturn
 The player who is on turn. More...
 
std::vector< Cardcards
 The information on all the cards. More...
 
std::vector< Playerplayers
 The information on all the players. More...
 
std::vector< int > quartets
 The information of who has a certain quartet. More...
 

Detailed Description

The complete game state.

This struct contains all the information of the game state at a specific moment in time.

Definition at line 57 of file state.h.

Member Data Documentation

◆ cards

std::vector<Card> State::cards

The information on all the cards.

This vector also contains information on which card is in what set and which card they are with respect to their set. Consider the following example [card0, ..., card7] and we have a SET_SIZE of 4 and thus a NUM_SETS of 2 then the cards [card0, ..., card3] belong to set 0 and [card4, ..., card7] belong to set 1. So, in these examples card4 will be card 0 with respect to its own set and card7 will be card 3.

Definition at line 74 of file state.h.

◆ onturn

int State::onturn

The player who is on turn.

Definition at line 62 of file state.h.

◆ players

std::vector<Player> State::players

The information on all the players.

This is where it is defined who is player 0, 1, etc.

Definition at line 81 of file state.h.

◆ quartets

std::vector<int> State::quartets

The information of who has a certain quartet.

The quartet array contains NUM_SETS entries, so one for every set, if the entry is -1, no one has the full set, if someone does have the quartet the entry is equal to the player index who has the quartet.

Definition at line 90 of file state.h.


The documentation for this struct was generated from the following file: