fix
This commit is contained in:
parent
f52bea91ac
commit
8fb6fac75d
@ -3,9 +3,11 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
## 0.1.5 - 2024-07-24
|
## 0.1.5 - 2024-07-25
|
||||||
### Added
|
### Added
|
||||||
- socket.io room management
|
- socket.io room management
|
||||||
|
### Fixed
|
||||||
|
- Blocked game not waiting for all turns to complete
|
||||||
|
|
||||||
## 0.1.4 - 2024-07-20
|
## 0.1.4 - 2024-07-20
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ export class DominoesGame extends EventEmitter {
|
|||||||
tiles.push(...player.hand);
|
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]);
|
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 {
|
isGameOver(): boolean {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user