daily pastebin goal
39%
SHARE
TWEET

minesweeper.h

a guest Mar 25th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. //
  3. // Created by domin on 09.03.2019.
  4. //
  5.  
  6. #ifndef SAPER_PO_MINESWEEPERBOARD_H
  7. #define SAPER_PO_MINESWEEPERBOARD_H
  8.  
  9. enum GameMode  { DEBUG, EASY, NORMAL, HARD };
  10. enum GameState { RUNNING, FINISHED_WIN, FINISHED_LOSS };
  11.  
  12. struct Field
  13. {
  14.     bool hasMine;
  15.     bool hasFlag;
  16.     bool isRevealed;
  17. };
  18.  
  19.  
  20. class MinesweeperBoard
  21. {
  22. public:
  23.     Field board[100][100];
  24.     int width;
  25.     int height;
  26.     void set_board();
  27.     GameMode mode;
  28.     int Minecount;
  29.  
  30. public:
  31.     MinesweeperBoard();
  32.     void debug_display();
  33.     void gamemode (GameMode mode);
  34.     int getBoardWidth() const;
  35.     int getBoardHeight() const;
  36.     int getMineCount() const;
  37.     void countMines(int x, int y);
  38.     bool hasFlag(int x, int y) const;
  39. };
  40.  
  41.  
  42. #endif //SAPER_PO_MINESWEEPERBOARD_H
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top