1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef GAME
- #define GAME
- #include "qwixx.h"
- #include "dice.h"
- #include "ScoreSheet.h"
- #include <windows.h>
- #include <array>
- #include <time.h>
- struct Turn
- {
- std::array<Move, 2> moves;
-
- int numberOfMoves = 0;
- bool penalty;
- };
- class Game {
- public:
- std::vector<ScoreSheet> players;
- std::vector<bool> lockOut;
- int lastColumnIndex;
- int state;
- Dice dice;
- int activePlayer;
- Game();
- void round();
- void score();
- std::string send();
- struct Turn receive(std::string userInput);
-
- bool addPlayer(std::string name);
-
- void addX(int player, int color, int index);
- bool checkTurn (int player, Turn turn);
-
- 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);
-
- private:
- int entropyPool;
- };
- #endif
|