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

LibCards+Games: Return ErrorOr from CardStack::add_all_grabbed_cards()

...and CardGame::pick_up_cards_from_stack() which is its only caller.
This commit is contained in:
Sam Atkins 2023-01-20 13:33:30 +00:00 committed by Linus Groh
parent c7c4d70f6e
commit ccabc8e930
6 changed files with 16 additions and 13 deletions

View file

@ -42,7 +42,7 @@ public:
NonnullRefPtrVector<Card> const& moving_cards() const { return m_moving_cards; }
Gfx::IntRect moving_cards_bounds() const;
RefPtr<CardStack> moving_cards_source_stack() const { return m_moving_cards_source_stack; }
void pick_up_cards_from_stack(CardStack&, Gfx::IntPoint click_location, CardStack::MovementRule);
ErrorOr<void> pick_up_cards_from_stack(CardStack&, Gfx::IntPoint click_location, CardStack::MovementRule);
RefPtr<CardStack> find_stack_to_drop_on(CardStack::MovementRule) const;
ErrorOr<void> drop_cards_on_stack(CardStack&, CardStack::MovementRule);
void clear_moving_cards();