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})` ); // 自动切换到可用类型