From 435d806b921ff9e2f6386fa897bd893e1e4d65ce Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 10 Oct 2020 17:28:32 -0600 Subject: [PATCH] Assume everyone is liberal so we only ever need to change the fascist players --- src/utils/Game.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/utils/Game.ts b/src/utils/Game.ts index 1d648ab..4f125d6 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -47,7 +47,7 @@ export class Game { public add_player(player: string, id: string, is_host:boolean=false): void { this._players[player] = { position: undefined, - role: undefined, + role: `liberal`, host: is_host, socket: id, }; @@ -95,11 +95,6 @@ export class Game { players.splice(player_index, 1); }; - // Everyone else is a liberal - for (var player of players) { - this._players[player].role = `liberal`; - }; - // Create the deck for the game for (var i = 0; i <= DECK.total; i++) { if (i <= DECK.fascist) {