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

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
parent 83687f85df
commit 8b3a94ffbc
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;