Spaces:
Sleeping
Sleeping
try
Browse files- convex/aiTown/game.ts +1 -1
convex/aiTown/game.ts
CHANGED
@@ -236,7 +236,7 @@ export class Game extends AbstractGame {
|
|
236 |
// Check for end game conditions
|
237 |
// are there any humans?
|
238 |
// we check for endgame if there's at least 1 human player
|
239 |
-
const humans = [...this.world.
|
240 |
if (this.world.gameCycle.cycleState !== 'LobbyState' && humans.length > 0) {
|
241 |
// all 'werewolf' are dead -> villagers win
|
242 |
const werewolves = [...this.world.players.values()].filter(player =>
|
|
|
236 |
// Check for end game conditions
|
237 |
// are there any humans?
|
238 |
// we check for endgame if there's at least 1 human player
|
239 |
+
const humans = [...this.world.players.values()].filter(player => player.human)
|
240 |
if (this.world.gameCycle.cycleState !== 'LobbyState' && humans.length > 0) {
|
241 |
// all 'werewolf' are dead -> villagers win
|
242 |
const werewolves = [...this.world.players.values()].filter(player =>
|