#include "qwixx.h" #include "dice.h" #include "playerCard.h" class Game { public: std::vector players; int state; Dice dice; // rules as methods of game bool addPlayer(std::string name); }; Game::Game() { // set the state of game state = NOT_STARTED; // dice have been initialized with random seed }; bool Game::addPlayer(std::string name){ if (NOT_STARTED == state){ PlayerCard newplayer(name); players.push_back(newplayer); fprintf (stdout, "added: %s to the game", name); return true; } else{ fprintf(stdout, "player %s was not added to the game", name); return false; } };