diff --git a/public/src/games/dominion/DominionGame.js b/public/src/games/dominion/DominionGame.js index 39bff9b..a33eb39 100644 --- a/public/src/games/dominion/DominionGame.js +++ b/public/src/games/dominion/DominionGame.js @@ -355,6 +355,22 @@ export default class DominionGame extends Phaser.Scene { color: active ? COLORS.goldHex : COLORS.mutedHex, align: 'center', backgroundColor: 'rgba(0,0,0,0.55)', padding: { x: 8, y: 4 }, }).setOrigin(0.5).setDepth(D.hud)); + + // Mini face-down cards representing the opponent's hand + const OPP_W = 36, OPP_H = 52; + const handSize = p.hand.length; + if (handSize > 0) { + const gap = Math.min(4, (200 - handSize * OPP_W) / Math.max(1, handSize - 1)); + const step = OPP_W + Math.max(-OPP_W * 0.6, gap); + const totalW = (handSize - 1) * step + OPP_W; + const startX = s.x - totalW / 2 + OPP_W / 2; + const cardY = s.y + s.r + 75; + for (let j = 0; j < handSize; j++) { + const mini = this.buildCardFace(OPP_W, OPP_H, null, { faceDown: true }); + mini.setPosition(startX + j * step, cardY).setDepth(D.hud + j); + this.dynamicLayer.add(mini); + } + } }); }