diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6c944..4946c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,11 @@ All notable changes to this project will be documented in this file. ## Unreleased -## 0.1.5 - 2024-07-24 +## 0.1.5 - 2024-07-25 ### Added - socket.io room management +### Fixed +- Blocked game not waiting for all turns to complete ## 0.1.4 - 2024-07-20 diff --git a/src/game/DominoesGame.ts b/src/game/DominoesGame.ts index f409f72..4c652c1 100644 --- a/src/game/DominoesGame.ts +++ b/src/game/DominoesGame.ts @@ -97,7 +97,7 @@ export class DominoesGame extends EventEmitter { tiles.push(...player.hand); } const canPlay = tiles.some(tile => tile.pips[0] === freeEnds[0] || tile.pips[1] === freeEnds[0] || tile.pips[0] === freeEnds[1] || tile.pips[1] === freeEnds[1]); - return !canPlay; + return this.blockedCount >= 4 && !canPlay; } isGameOver(): boolean {