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:
Camron 2021-09-04 17:42:54 -04:00 committed by Brian Gianforcaro
parent 68b5e6c565
commit 5137f96bd6
Notes: sideshowbarker 2024-07-18 01:17:40 +09:00

View file

@ -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));
} }