Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MINESWEEPERBOARD_H
- #define MINESWEEPERBOARD_H
- enum GameMode{DEBUG,EASY,NORMAL,HARD};
- enum GameState{RUNNING,FINISHED_WIN,FINISHED_LOSS};
- struct Field
- {
- bool hasMine;
- bool hasFlag;
- bool isRevealed;
- };
- class MinesweeperBoard
- {
- Field board[100][100];
- int width;
- int height;
- GameMode mode;
- int allMines;
- int MineCount;
- int x;
- int y;
- public:
- GameState state;
- MinesweeperBoard(int height,int width,GameMode mode);
- void debug_display()const;
- int getBoardWidth() const;
- int getBoardHeight() const;
- int getMineCount() const;
- int countMines(int x,int y);
- int hasFlag(int x, int y) const;
- void toggleFlag(int x, int y);
- void revealField(int x, int y);
- bool isRevealed(int x, int y) const;
- GameState getGameState() const;
- char getFieldInfo(int x, int y) const;
- };
- #endif // MINESWEEPERBOARD_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement