27 .allowSameRank =
true,
28 .allowSameSuit =
true,
29 .defaultLPsOnField = 0,
30 .defaultPlayersLPs = 2
51 bool ignoreConfigFile = code & 0b00001;
52 bool dontAskConfigOptions = code & 0b00010;
53 bool saveToFile = code & 0b00100;
54 bool beVerbose = code & 0b01000;
55 bool useTui = code & 0b10000;
60 cfg = cliGameConfiguration;
61 else if(!dontAskConfigOptions)
GameConfiguration getDefaultConfiguration()
Retrieves the default game configuration.
GameConfiguration getGameConfiguration(const int code, const GameConfiguration cliGameConfiguration)
Gets the game configuration based on the action code. If action code is ACTION_HELP,...
bool isDefaultGameConfiguration(const GameConfiguration config)
Determines if a given game configuration is the default one.
Definition of functions which retrieves the game configuration from the possible sources.
GameConfiguration askConfigurationOptionsViaTerminal()
Asks to the user via terminal the game configuration.
bool existsConfigurationFile()
Checks by filename if a game configuration file exists.
void saveConfigurationToFile(GameConfiguration configuration, bool overwriteIfExists)
Save the given configuration to the game configuration file. It overwrites an existing file if and on...
GameConfiguration getConfigurationFromFile()
Load the game configuration from the file. It checks if the file exists.
#define ACTION_HELP
With this action code, the program has printed help messages.
The game configuration structure.
bool allowSameRank
Determines if a player can have cards with the same rank. It increases randomness if set to false.
bool useTui
Determines if the gama has to use the terminal user interface (TUI).
int defaultLPsOnField
The default amount of LPs on the playing field at the beginning of a match.
bool beVerbose
Determines if the program has to have a verbose logging behaviour.
int defaultPlayersLPs
The default amount of LPs that every player have at the beginning of a match.
bool allowSameSuit
Determines if a player can have cards with the same suit It increases randomness if set to false.