fix logic that determines whether games are startable when the game is first constructed

This commit is contained in:
AlecM33
2023-11-28 18:19:21 -05:00
parent b6e22b9b3d
commit 95d0cee35f
3 changed files with 8 additions and 7 deletions

View File

@@ -42,6 +42,9 @@ describe('Events', () => {
new Date().toJSON(),
null
);
game.isStartable = game.people.filter(person => person.userType === USER_TYPES.PLAYER
|| person.userType === USER_TYPES.TEMPORARY_MODERATOR
|| person.userType === USER_TYPES.BOT).length === game.gameSize;
spyOn(namespace, 'to').and.callThrough();
spyOn(namespace, 'in').and.callThrough();
spyOn(socket, 'to').and.callThrough();