game.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #ifndef GAME
  2. #define GAME
  3. #include "qwixx.h"
  4. #include "dice.h"
  5. #include "ScoreSheet.h"
  6. #include <windows.h>
  7. class Game {
  8. public:
  9. std::vector<ScoreSheet> players;
  10. std::vector<bool> lockOut;
  11. int lastColumnIndex;
  12. int state;
  13. Dice dice;
  14. int activePlayer;
  15. Game();
  16. void turn(ScoreSheet activePlayer);
  17. void score();
  18. std::string send();
  19. void receive(std::string userInput);
  20. // rules as methods of game
  21. bool addPlayer(std::string name);
  22. // rule for lockout to populate a locked out row so score function can check for locked rows
  23. void addX(int player, int color, int index);
  24. // 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
  25. /* TODO: generate a set of all possible moves a player can take given a: ScoreSheet & diceRoll
  26. * 1. one good reason to do this would be to check if a player can make a given move
  27. * 2. if you give this set of moves to an AI, it could pick a move
  28. * 3. could give hints to an end user about what move they can take
  29. */
  30. };
  31. #endif