Skip to content

Commit 420c206

Browse files
author
Sorra
authored
Merge pull request #415 from TheWizardsCode/wl-followup/fix-golf-discard-visual
Fix: refresh discard pile visual after AI draw restore (flaky browser test)
2 parents c9bf49f + b397c8e commit 420c206

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

example-games/golf/scenes/GolfScene.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,14 @@ export class GolfScene extends CardGameScene {
974974
this.session.shared.discardPile.push(drawnCard);
975975
}
976976

977+
// After restoring the drawn card to the pile, ensure the discard
978+
// pile visual is in sync with the underlying state. There is a
979+
// short window between temporarily removing the top card and
980+
// restoring it where the discard sprite may show a placeholder
981+
// (card_back). Refresh the piles now so tests and viewers see the
982+
// correct texture immediately.
983+
this.refreshPiles();
984+
977985
const result = executeTurn(this.session, action);
978986
this.recorder.recordTurn(result, action.drawSource);
979987

Loading

0 commit comments

Comments
 (0)