Solitaire: Fix 3 card draw from reversing after an undo
Solitaire: Fix 3 card draw from reversing after an undo Co-Authored-By: Tim Flynn <trflynn89@pm.me>
This commit is contained in:
parent
68b5e6c565
commit
5137f96bd6
Notes:
sideshowbarker
2024-07-18 01:17:40 +09:00
Author: https://github.com/Camron 🔰 Commit: https://github.com/SerenityOS/serenity/commit/5137f96bd64 Pull-request: https://github.com/SerenityOS/serenity/pull/9828 Issue: https://github.com/SerenityOS/serenity/issues/9820 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ void Game::draw_cards()
|
||||||
NonnullRefPtrVector<Card> cards_drawn;
|
NonnullRefPtrVector<Card> cards_drawn;
|
||||||
for (size_t i = 0; (i < cards_to_draw) && !stock.is_empty(); ++i) {
|
for (size_t i = 0; (i < cards_to_draw) && !stock.is_empty(); ++i) {
|
||||||
auto card = stock.pop();
|
auto card = stock.pop();
|
||||||
cards_drawn.append(card);
|
cards_drawn.prepend(card);
|
||||||
play.push(move(card));
|
play.push(move(card));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue