1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:27:35 +00:00

Solitaire: Add Auto-Collect gameplay option

Add the option for players to enable automatic collection of eligible
cards to their foundation pile with a single click of that card.
This commit is contained in:
Thitat Auareesuksakul 2021-08-27 00:49:05 +07:00 committed by Andreas Kling
parent d4e425e52e
commit 95ff65e211
3 changed files with 19 additions and 0 deletions

View file

@ -40,6 +40,9 @@ public:
void setup(Mode);
void perform_undo();
bool is_auto_collecting() const { return m_auto_collect; }
void set_auto_collect(bool collect) { m_auto_collect = collect; }
Function<void(uint32_t)> on_score_update;
Function<void()> on_game_start;
Function<void(GameOverReason, uint32_t)> on_game_end;
@ -208,6 +211,8 @@ private:
uint32_t m_score { 0 };
uint8_t m_passes_left_before_punishment { 0 };
bool m_auto_collect { false };
};
}