refactor: rename Yatzi to Zahtzee and update category persistence

- Rename game from "Yatzi" to "Zahtzee" across UI and server registry
- Move game category from tabletop to cards
- Persist last selected menu category using _lastCategory
- Update game-icons asset files
This commit is contained in:
Brian Fertig 2026-06-07 11:20:25 -06:00
parent 8a69710946
commit 1b7efd5107
6 changed files with 10 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

View File

@ -135,7 +135,7 @@ export default class YatziGame extends Phaser.Scene {
// ─── Left panel (title + status) ────────────────────────────────────── // ─── Left panel (title + status) ──────────────────────────────────────
buildLeftPanel() { buildLeftPanel() {
this.add.text(LEFT_CX, 56, 'Yatzi', { this.add.text(LEFT_CX, 56, 'Zahtzee', {
fontFamily: 'Righteous', fontSize: '60px', color: COLORS.textHex, fontFamily: 'Righteous', fontSize: '60px', color: COLORS.textHex,
}).setOrigin(0.5); }).setOrigin(0.5);
@ -220,7 +220,7 @@ export default class YatziGame extends Phaser.Scene {
this.buildSummaryRow(grid, y, 'Lower subtotal', 'lowerSubtotal', colW); this.buildSummaryRow(grid, y, 'Lower subtotal', 'lowerSubtotal', colW);
y += SC_SUMMARY_H; y += SC_SUMMARY_H;
// Yahtzee bonus // Yahtzee bonus
this.buildSummaryRow(grid, y, 'Yahtzee bonus', 'yahtzeeBonus', colW); this.buildSummaryRow(grid, y, 'Zahtzee bonus', 'yahtzeeBonus', colW);
y += SC_SUMMARY_H; y += SC_SUMMARY_H;
// Grand total // Grand total
this.drawRowDivider(grid, y); this.drawRowDivider(grid, y);
@ -540,7 +540,7 @@ export default class YatziGame extends Phaser.Scene {
showBonusToast() { showBonusToast() {
if (this.toastText) this.toastText.destroy(); if (this.toastText) this.toastText.destroy();
this.toastText = this.add.text(LEFT_CX, 380, '+100 Yahtzee Bonus!', { this.toastText = this.add.text(LEFT_CX, 380, '+100 Zahtzee Bonus!', {
fontFamily: 'Righteous', fontSize: '32px', color: COLORS.goldHex, fontFamily: 'Righteous', fontSize: '32px', color: COLORS.goldHex,
}).setOrigin(0.5).setDepth(DEPTH.toast); }).setOrigin(0.5).setDepth(DEPTH.toast);
this.tweens.add({ this.tweens.add({

View File

@ -33,7 +33,7 @@ export const CATEGORY_LABELS = {
fullHouse: 'Full House', fullHouse: 'Full House',
smallStraight: 'Sm. Straight', smallStraight: 'Sm. Straight',
largeStraight: 'Lg. Straight', largeStraight: 'Lg. Straight',
yahtzee: 'Yahtzee', yahtzee: 'Zahtzee',
chance: 'Chance', chance: 'Chance',
}; };

View File

@ -6,6 +6,8 @@ import { addFullscreenButton } from '../ui/FullscreenButton.js';
import { playMenuMusic, stopMenuMusic } from '../ui/MenuMusic.js'; import { playMenuMusic, stopMenuMusic } from '../ui/MenuMusic.js';
import { TutorialModal } from '../ui/TutorialModal.js'; import { TutorialModal } from '../ui/TutorialModal.js';
let _lastCategory = null;
const CATEGORIES = [ const CATEGORIES = [
{ key: 'tabletop', label: 'Tabletop' }, { key: 'tabletop', label: 'Tabletop' },
{ key: 'cards', label: 'Cards & Dice' }, { key: 'cards', label: 'Cards & Dice' },
@ -80,12 +82,14 @@ export default class GameMenuScene extends Phaser.Scene {
this._tabIcons[key] = icon; this._tabIcons[key] = icon;
}); });
this.showCategory(activeCats[0].key); const startKey = activeCats.find(c => c.key === _lastCategory) ? _lastCategory : activeCats[0].key;
this.showCategory(startKey);
new Button(this, cx, GAME_HEIGHT - 100, 'Back', () => this.scene.start('Landing'), { variant: 'ghost' }); new Button(this, cx, GAME_HEIGHT - 100, 'Back', () => this.scene.start('Landing'), { variant: 'ghost' });
} }
showCategory(key) { showCategory(key) {
_lastCategory = key;
for (const [k, btn] of Object.entries(this._tabs)) { for (const [k, btn] of Object.entries(this._tabs)) {
btn.setActive(k === key); btn.setActive(k === key);
} }

View File

@ -29,7 +29,7 @@ registerGame({ slug: 'backgammon', name: 'Backgammon', category: 'ta
registerGame({ slug: 'parchisi', name: 'Parchisi', category: 'tabletop', minPlayers: 1, maxPlayers: 4, minOpponents: 3, maxOpponents: 3, iconFrame: 1 }); registerGame({ slug: 'parchisi', name: 'Parchisi', category: 'tabletop', minPlayers: 1, maxPlayers: 4, minOpponents: 3, maxOpponents: 3, iconFrame: 1 });
registerGame({ slug: 'blackjack', name: 'Blackjack', category: 'casino', cardGame: true, minPlayers: 1, maxPlayers: 7, minOpponents: 0, maxOpponents: 6, iconFrame: 2 }); registerGame({ slug: 'blackjack', name: 'Blackjack', category: 'casino', cardGame: true, minPlayers: 1, maxPlayers: 7, minOpponents: 0, maxOpponents: 6, iconFrame: 2 });
registerGame({ slug: 'holdem', name: "Texas Hold 'Em", category: 'casino', cardGame: true, minPlayers: 2, maxPlayers: 8, minOpponents: 3, maxOpponents: 7, iconFrame: 3 }); registerGame({ slug: 'holdem', name: "Texas Hold 'Em", category: 'casino', cardGame: true, minPlayers: 2, maxPlayers: 8, minOpponents: 3, maxOpponents: 7, iconFrame: 3 });
registerGame({ slug: 'yatzi', name: 'Yatzi', category: 'tabletop', minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 4 }); registerGame({ slug: 'yatzi', name: 'Zahtzee', category: 'cards', minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 4 });
registerGame({ slug: 'skipbo', name: 'Skip-Bo', category: 'cards', cardGame: true, minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 5 }); registerGame({ slug: 'skipbo', name: 'Skip-Bo', category: 'cards', cardGame: true, minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 5 });
registerGame({ slug: 'phase10', name: 'Phase 10', category: 'cards', cardGame: true, minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 6 }); registerGame({ slug: 'phase10', name: 'Phase 10', category: 'cards', cardGame: true, minPlayers: 1, maxPlayers: 4, minOpponents: 1, maxOpponents: 3, iconFrame: 6 });
registerGame({ slug: 'chinesecheckers', name: 'Chinese Checkers', category: 'tabletop', minPlayers: 6, maxPlayers: 6, minOpponents: 5, maxOpponents: 5, iconFrame: 7 }); registerGame({ slug: 'chinesecheckers', name: 'Chinese Checkers', category: 'tabletop', minPlayers: 6, maxPlayers: 6, minOpponents: 5, maxOpponents: 5, iconFrame: 7 });