Space Walk board game
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
553 B

  1. #ifndef BOARD_H
  2. #define BOARD_H
  3. #define BOARD_SIZE 14
  4. #include <vector>
  5. class SpaceShip;
  6. class Board
  7. {
  8. public:
  9. Board();
  10. ~Board();
  11. SpaceShip *getShip(unsigned char planet, unsigned char pos);
  12. std::vector<SpaceShip *> *getShips(unsigned char planet);
  13. bool setShip(unsigned char planet, SpaceShip *ship);
  14. bool moveShip(unsigned char planet, SpaceShip *ship);
  15. void sortPlanet(unsigned char planet);
  16. private:
  17. // Data layout:
  18. // Black hole, 6 planets, 6 planets, black hole
  19. std::vector<SpaceShip *> *planets[BOARD_SIZE];
  20. };
  21. #endif // BOARD_H