From 1a54b301d126c136564421b29ed26ec9d7721ecc Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sun, 28 Feb 2021 19:33:12 -0700 Subject: [PATCH] Add method for storing a card in the spirit's hand --- server/src/objects/Team.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/src/objects/Team.ts b/server/src/objects/Team.ts index 29984fa..1257669 100644 --- a/server/src/objects/Team.ts +++ b/server/src/objects/Team.ts @@ -49,7 +49,16 @@ export class Team { * @param question The card text to remove from the hand. */ public removeCard(question: string) { - this._hand = this._hand.filter(x => x != question); + + + /** + * Asks the spirit a question, removing it from the medium's hands + * + * @param question The question that is being asked + */ + public askSpiritQuestion(question: string) { + this._hand.writer.push(question); + this.removeCard(question); };