LibCards+Games+GamesSettings: Return ErrorOr from CardStack::push()

Very few of these calls can propagate their errors yet, but one step at
a time. :^)
This commit is contained in:
Sam Atkins 2023-01-20 12:45:02 +00:00 committed by Linus Groh
commit 8b3a94ffbc
Notes: sideshowbarker 2024-07-17 01:22:43 +09:00
6 changed files with 32 additions and 30 deletions

View file

@ -43,9 +43,9 @@ public:
bool make_top_card_visible(); // Returns true if the card was flipped.
void push(NonnullRefPtr<Card> card);
ErrorOr<void> push(NonnullRefPtr<Card>);
NonnullRefPtr<Card> pop();
void take_all(CardStack&);
ErrorOr<void> take_all(CardStack&);
void rebound_cards();
bool is_allowed_to_push(Card const&, size_t stack_size = 1, MovementRule movement_rule = MovementRule::Alternating) const;