From: Carl Worth Date: Wed, 10 Jun 2020 14:25:13 +0000 (-0700) Subject: Fix the /reset endpoint X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=9fb6009a9666b92b18436975409d3717128ec9ba Fix the /reset endpoint The fix here was pretty simple. I'd only missed this because I had forgotten to add an explicit setting of state.scores to null in the constructor, (so then forgot to also do the same in reset()). --- diff --git a/empathy.js b/empathy.js index 3ec4a7b..11539d8 100644 --- a/empathy.js +++ b/empathy.js @@ -7,7 +7,8 @@ class Empathy extends Game { this.state = { prompts: [], active_prompt: null, - players_answered: 0 + players_answered: 0, + scores: null }; this.answers = []; this.next_prompt_id = 1; @@ -16,6 +17,8 @@ class Empathy extends Game { reset() { this.state.active_prompt = null; this.state.players_answered = 0; + this.state.scores = null; + this.answers = []; this.broadcast_event_object('game-state', this.state);