Skip to content

Commit 06db19f

Browse files
committed
Merge fix/CG-0MLYQW78Q1K4ZZ2R-bc-layout: Fix Beleaguered Castle card layout (#10)
2 parents 4ea2b30 + be64051 commit 06db19f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

example-games/beleaguered-castle/scenes/BeleagueredCastleScene.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ const SFX_KEYS = {
6969
UI_CLICK: 'bc-sfx-ui-click',
7070
} as const;
7171

72-
// ── Local card dimensions (5:7 aspect ratio, ~2× default) ──
73-
const BC_CARD_W = 96;
74-
const BC_CARD_H = 134;
72+
// ── Local card dimensions (5:7 aspect ratio, sized to fit 8 columns) ──
73+
const BC_CARD_W = 75;
74+
const BC_CARD_H = 105;
7575

7676
// ── Constants ───────────────────────────────────────────────
7777

78-
const CARD_GAP = 10;
78+
const CARD_GAP = 16;
7979

8080
const ANIM_DURATION = 300; // ms per card deal animation
8181
const DEAL_STAGGER = 40; // ms between successive card deal tweens
@@ -84,18 +84,18 @@ const AUTO_COMPLETE_DELAY = 150; // ms between auto-complete card animations
8484

8585
/** Preferred vertical overlap offset between cascaded cards in a tableau column.
8686
* Dynamically compressed when a column has many cards (see tableauCardY). */
87-
const CASCADE_OFFSET_Y = 48;
87+
const CASCADE_OFFSET_Y = 36;
8888

8989
/** Maximum Y for the center of the bottom card in a tableau column.
9090
* Leaves room for the HUD bar at the bottom of the canvas. */
91-
const TABLEAU_MAX_Y = GAME_H - 40 - BC_CARD_H / 2; // ~613
91+
const TABLEAU_MAX_Y = GAME_H - 40 - BC_CARD_H / 2; // ~627
9292

9393
/** Top area: title + foundations */
9494
const TITLE_Y = 20;
95-
const FOUNDATION_Y = 110;
95+
const FOUNDATION_Y = 95;
9696

97-
/** Tableau starts below the foundations. */
98-
const TABLEAU_TOP_Y = 290;
97+
/** Tableau starts below the foundations (with room for suit labels). */
98+
const TABLEAU_TOP_Y = 240;
9999

100100
/** Z-depth for a card being dragged. */
101101
const DRAG_DEPTH = 1000;
@@ -425,8 +425,8 @@ export class BeleagueredCastleScene extends Phaser.Scene {
425425

426426
// Suit label beneath the slot
427427
const label = this.add
428-
.text(x, FOUNDATION_Y + BC_CARD_H / 2 + 18, SUIT_SYMBOL[suit], {
429-
fontSize: '22px',
428+
.text(x, FOUNDATION_Y + BC_CARD_H / 2 + 12, SUIT_SYMBOL[suit], {
429+
fontSize: '18px',
430430
color: SUIT_COLOR[suit],
431431
fontFamily: FONT_FAMILY,
432432
})

0 commit comments

Comments
 (0)