#ifndef GAME #define GAME #include "qwixx.h" #include "dice.h" #include "ScoreSheet.h" #include #include #include #include "fester.h" //temp network library struct Turn { std::array moves; // this can be zero, one or two int numberOfMoves = 0; bool penalty; }; class Game { public: std::vector players; std::vector lockOut; int lastColumnIndex; int state; Dice dice; int activePlayer; Game(); void round(); void score(); std::string send(); struct Turn receive(std::string userInput); // rules as methods of game bool addPlayer(std::string name); // rule for lockout to populate a locked out row so score function can check for locked rows void addX(int player, int color, int index); bool checkTurn (int player, Turn turn); // rule for being able to lockout a row, check for last box marked off and set condition where the next box has to be higher than that previous box check bool lockOutRule(int player, Turn turn); bool leftToRightRule(int player, Turn turn); bool isMoveRepresentedInDie(int player, Turn turn); struct Move Game::translateToMove(std::string temp); /* TODO: generate a set of all possible moves a player can take given a: ScoreSheet & diceRoll * 1. one good reason to do this would be to check if a player can make a given move * 2. if you give this set of moves to an AI, it could pick a move * 3. could give hints to an end user about what move they can take */ private: int entropyPool; }; #endif