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:
parent
83687f85df
commit
8b3a94ffbc
6 changed files with 32 additions and 30 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue