mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +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:
parent
d4e425e52e
commit
95ff65e211
3 changed files with 19 additions and 0 deletions
|
@ -260,6 +260,9 @@ void Game::mousedown_event(GUI::MouseEvent& event)
|
|||
remember_flip_for_undo(top_card);
|
||||
}
|
||||
} else if (m_focused_cards.is_empty()) {
|
||||
if (is_auto_collecting() && attempt_to_move_card_to_foundations(to_check))
|
||||
break;
|
||||
|
||||
to_check.add_all_grabbed_cards(click_location, m_focused_cards);
|
||||
m_mouse_down_location = click_location;
|
||||
to_check.set_focused(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue