mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
LibCards+Games: Return ErrorOr from deck-creation factory functions :^)
Also, be smarter about appending cards to the deck: we can unchecked_append them to the deck, since we already ensured enough capacity earlier.
This commit is contained in:
parent
0855e9f014
commit
c7c4d70f6e
5 changed files with 15 additions and 14 deletions
|
@ -74,7 +74,7 @@ void Game::setup(Mode mode)
|
|||
break;
|
||||
}
|
||||
|
||||
m_new_deck = Cards::create_deck(0, 0, heart_suits, spade_suits, Cards::Shuffle::Yes);
|
||||
m_new_deck = Cards::create_deck(0, 0, heart_suits, spade_suits, Cards::Shuffle::Yes).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
clear_moving_cards();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue