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:
parent
8a69710946
commit
1b7efd5107
Binary file not shown.
|
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 177 KiB |
Binary file not shown.
|
|
@ -135,7 +135,7 @@ export default class YatziGame extends Phaser.Scene {
|
|||
|
||||
// ─── Left panel (title + status) ──────────────────────────────────────
|
||||
buildLeftPanel() {
|
||||
this.add.text(LEFT_CX, 56, 'Yatzi', {
|
||||
this.add.text(LEFT_CX, 56, 'Zahtzee', {
|
||||
fontFamily: 'Righteous', fontSize: '60px', color: COLORS.textHex,
|
||||
}).setOrigin(0.5);
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ export default class YatziGame extends Phaser.Scene {
|
|||
this.buildSummaryRow(grid, y, 'Lower subtotal', 'lowerSubtotal', colW);
|
||||
y += SC_SUMMARY_H;
|
||||
// Yahtzee bonus
|
||||
this.buildSummaryRow(grid, y, 'Yahtzee bonus', 'yahtzeeBonus', colW);
|
||||
this.buildSummaryRow(grid, y, 'Zahtzee bonus', 'yahtzeeBonus', colW);
|
||||
y += SC_SUMMARY_H;
|
||||
// Grand total
|
||||
this.drawRowDivider(grid, y);
|
||||
|
|
@ -540,7 +540,7 @@ export default class YatziGame extends Phaser.Scene {
|
|||
|
||||
showBonusToast() {
|
||||
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,
|
||||
}).setOrigin(0.5).setDepth(DEPTH.toast);
|
||||
this.tweens.add({
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const CATEGORY_LABELS = {
|
|||
fullHouse: 'Full House',
|
||||
smallStraight: 'Sm. Straight',
|
||||
largeStraight: 'Lg. Straight',
|
||||
yahtzee: 'Yahtzee',
|
||||
yahtzee: 'Zahtzee',
|
||||
chance: 'Chance',
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import { addFullscreenButton } from '../ui/FullscreenButton.js';
|
|||
import { playMenuMusic, stopMenuMusic } from '../ui/MenuMusic.js';
|
||||
import { TutorialModal } from '../ui/TutorialModal.js';
|
||||
|
||||
let _lastCategory = null;
|
||||
|
||||
const CATEGORIES = [
|
||||
{ key: 'tabletop', label: 'Tabletop' },
|
||||
{ key: 'cards', label: 'Cards & Dice' },
|
||||
|
|
@ -80,12 +82,14 @@ export default class GameMenuScene extends Phaser.Scene {
|
|||
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' });
|
||||
}
|
||||
|
||||
showCategory(key) {
|
||||
_lastCategory = key;
|
||||
for (const [k, btn] of Object.entries(this._tabs)) {
|
||||
btn.setActive(k === key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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: '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: '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: '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 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue