Assume everyone is liberal so we only ever need to change the fascist players

This commit is contained in:
Oliver-Akins 2020-10-10 17:28:32 -06:00
parent 16c9376a55
commit 435d806b92

View file

@ -47,7 +47,7 @@ export class Game {
public add_player(player: string, id: string, is_host:boolean=false): void { public add_player(player: string, id: string, is_host:boolean=false): void {
this._players[player] = { this._players[player] = {
position: undefined, position: undefined,
role: undefined, role: `liberal`,
host: is_host, host: is_host,
socket: id, socket: id,
}; };
@ -95,11 +95,6 @@ export class Game {
players.splice(player_index, 1); 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 // Create the deck for the game
for (var i = 0; i <= DECK.total; i++) { for (var i = 0; i <= DECK.total; i++) {
if (i <= DECK.fascist) { if (i <= DECK.fascist) {