From ecfa89e383b1d13bfae3830754833f57fc0167f6 Mon Sep 17 00:00:00 2001 From: hyper Date: Sun, 12 Apr 2026 18:55:35 +0800 Subject: [PATCH] fix: boop supply --- packages/boop-game/src/scenes/PieceTypeSelector.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/boop-game/src/scenes/PieceTypeSelector.ts b/packages/boop-game/src/scenes/PieceTypeSelector.ts index 2c13822..4f4b1ac 100644 --- a/packages/boop-game/src/scenes/PieceTypeSelector.ts +++ b/packages/boop-game/src/scenes/PieceTypeSelector.ts @@ -88,10 +88,10 @@ export class PieceTypeSelector { update(state: BoopState): void { const currentPlayer = state.currentPlayer; - const { kittensInSupply, catsInSupply, catsOnBoard } = this.countPieces(state, currentPlayer); - + const { kittensInSupply, catsInSupply } = this.countPieces(state, currentPlayer); + const kittenAvailable = kittensInSupply > 0; - const catsAvailable = catsInSupply + catsOnBoard > 0; + const catsAvailable = catsInSupply > 0; this.updateButton( this.kittenButton, @@ -104,7 +104,7 @@ export class PieceTypeSelector { this.catButton, catsAvailable, this.selectedType === 'cat', - `🐱 大猫 (${catsInSupply + catsOnBoard})` + `🐱 大猫 (${catsInSupply})` ); // 自动切换到可用类型