mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
Minesweeper: Add considering feature, where middle clicking marks with '?'
This is useful in the harder modes, for trying out different possibilities.
This commit is contained in:
parent
ed957ca2e1
commit
75734aa003
3 changed files with 49 additions and 2 deletions
|
@ -20,6 +20,7 @@ public:
|
|||
bool is_swept { false };
|
||||
bool has_mine { false };
|
||||
bool has_flag { false };
|
||||
bool is_considering { false };
|
||||
int row { 0 };
|
||||
int column { 0 };
|
||||
int number { 0 };
|
||||
|
@ -52,6 +53,7 @@ private:
|
|||
|
||||
void on_square_clicked(Square&);
|
||||
void on_square_right_clicked(Square&);
|
||||
void on_square_middle_clicked(Square&);
|
||||
void on_square_chorded(Square&);
|
||||
void game_over();
|
||||
void win();
|
||||
|
@ -63,7 +65,7 @@ private:
|
|||
|
||||
void flood_fill(Square&);
|
||||
|
||||
template<typename Callback> void for_each_neighbor_of(const Square&, Callback);
|
||||
template<typename Callback> void for_each_square(Callback);
|
||||
|
||||
enum class Face { Default, Good, Bad };
|
||||
void set_face(Face);
|
||||
|
@ -76,6 +78,7 @@ private:
|
|||
RetainPtr<GraphicsBitmap> m_mine_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_flag_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_badflag_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_consider_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_default_face_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_good_face_bitmap;
|
||||
RetainPtr<GraphicsBitmap> m_bad_face_bitmap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue