mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibCards+Game: Return ErrorOr from CardGame::drop_cards_on_stack()
This commit is contained in:
parent
8b3a94ffbc
commit
0855e9f014
4 changed files with 7 additions and 5 deletions
|
@ -288,7 +288,7 @@ void Game::mousedown_event(GUI::MouseEvent& event)
|
|||
void Game::move_focused_cards(CardStack& stack)
|
||||
{
|
||||
auto card_count = moving_cards().size();
|
||||
drop_cards_on_stack(stack, Cards::CardStack::MovementRule::Any);
|
||||
drop_cards_on_stack(stack, Cards::CardStack::MovementRule::Any).release_value_but_fixme_should_propagate_errors();
|
||||
bool was_visible = moving_cards_source_stack()->is_empty() || !moving_cards_source_stack()->peek().is_upside_down();
|
||||
remember_move_for_undo(*moving_cards_source_stack(), stack, card_count, was_visible);
|
||||
update_score(-1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue