mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
fix logic that determines whether games are startable when the game is first constructed
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user