Don't show hand value until cards dealt
This commit is contained in:
parent
bf47c50dfa
commit
795ef9b11f
|
|
@ -766,11 +766,13 @@ export default class BlackjackGame extends Phaser.Scene {
|
|||
// Build card graphics now (hands are populated but graphics weren't created yet)
|
||||
this.renderAll();
|
||||
|
||||
// Hide all cards initially
|
||||
// Hide all cards and score totals initially
|
||||
for (const cards of Object.values(this.cardGraphics)) {
|
||||
for (const c of cards) c.setAlpha(0);
|
||||
}
|
||||
for (const c of this.dealerCardGraphics) c.setAlpha(0);
|
||||
for (const txt of Object.values(this.scoreTxts)) txt.setAlpha(0);
|
||||
this.dealerScoreTxt.setAlpha(0);
|
||||
|
||||
let idx = 0;
|
||||
const DECK_X = CX + 200, DECK_Y = 50;
|
||||
|
|
@ -778,6 +780,8 @@ export default class BlackjackGame extends Phaser.Scene {
|
|||
|
||||
const dealNext = () => {
|
||||
if (idx >= dealSeq.length) {
|
||||
for (const txt of Object.values(this.scoreTxts)) txt.setAlpha(1);
|
||||
this.dealerScoreTxt.setAlpha(1);
|
||||
onComplete();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue