diff --git a/client/src/styles/game.css b/client/src/styles/game.css index b667334..fcc2c4f 100644 --- a/client/src/styles/game.css +++ b/client/src/styles/game.css @@ -382,7 +382,7 @@ h1 { #role-description { overflow: auto; position: absolute; - bottom: 8%; + bottom: 6%; left: 50%; transform: translate(-50%, 0); font-size: 15px; @@ -785,6 +785,14 @@ canvas { font-size: 18px; } + #game-people-container { + padding: 5px; + } + + #players-alive-label { + font-size: 20px; + } + #client-name { font-size: 20px; } @@ -810,8 +818,8 @@ canvas { /* padding: 5px;*/ /*}*/ - .game-player-name { - font-size: 16px; + .game-player-name, .game-player-role { + font-size: 14px; } #game-timer { diff --git a/server/modules/SocketManager.js b/server/modules/SocketManager.js index 9b5afc7..428aa77 100644 --- a/server/modules/SocketManager.js +++ b/server/modules/SocketManager.js @@ -85,7 +85,7 @@ class SocketManager { if (!person) { person = game.spectators.find((spectator) => spectator.id === args.personId); } - gameManager.transferModeratorPowers(game, person, namespace, this.logger); + gameManager.transferModeratorPowers(socket, game, person, namespace, this.logger); break; case EVENT_IDS.CHANGE_NAME: gameManager.changeName(game, args.data, ackFn); diff --git a/spec/unit/server/modules/GameManager_Spec.js b/spec/unit/server/modules/GameManager_Spec.js index 9286824..ac6d265 100644 --- a/spec/unit/server/modules/GameManager_Spec.js +++ b/spec/unit/server/modules/GameManager_Spec.js @@ -24,6 +24,7 @@ describe('GameManager', () => { beforeEach(() => { spyOn(namespace, 'to').and.callThrough(); + spyOn(socket, 'to').and.callThrough(); }); describe('#transferModerator', () => { @@ -127,6 +128,7 @@ describe('GameManager', () => { expect(personToTransferTo.userType).toEqual(USER_TYPES.MODERATOR); expect(tempMod.userType).toEqual(USER_TYPES.MODERATOR); expect(namespace.to).toHaveBeenCalledOnceWith(personToTransferTo.socketId); + expect(socket.to).toHaveBeenCalledWith(game.accessCode); }); });