From eca3b1d5f91b8b283855766ac2bf7041a83d47c5 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 1 Jan 2021 16:05:16 -0700 Subject: [PATCH] Add an id attribute and default the guessers array --- server/src/objects/Team.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/objects/Team.ts b/server/src/objects/Team.ts index 7447362..acbeb6f 100644 --- a/server/src/objects/Team.ts +++ b/server/src/objects/Team.ts @@ -1,16 +1,19 @@ import { Player } from "./Player"; export class Team { + readonly id: team; public guessers: Player[]; public writer: Player | null; private _hand: string[]; private _questions: string[]; private _answers: string[]; - constructor() { + constructor(id: team) { + this.id = id; this._answers = new Array(8).fill(``); this._questions = []; this._hand = []; + this.guessers = []; };