From 21f08cecab3e2fc099b4704386a141523a9799c4 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 3 Aug 2023 08:56:42 -0600 Subject: [PATCH] Reset the guessed letters when starting a new game --- src/endpoints/new_game.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/endpoints/new_game.ts b/src/endpoints/new_game.ts index a4e0bc5..099e679 100644 --- a/src/endpoints/new_game.ts +++ b/src/endpoints/new_game.ts @@ -39,6 +39,7 @@ const route: ServerRoute = { data.solution = spaced; data.incorrect = 0; data.key = convertToKey(spaced); + data.guesses = []; // Tell the overlay(s) to start a new game request.server.app.io.to(channel).emit(`state`, { @@ -53,4 +54,4 @@ const route: ServerRoute = { return `${data.current} (incorrect: ${data.incorrect}/${config.game.max_incorrect})`; }, }; -export default route; \ No newline at end of file +export default route;