Reset the guessed letters when starting a new game
This commit is contained in:
parent
aec13c1cee
commit
21f08cecab
1 changed files with 2 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ const route: ServerRoute = {
|
||||||
data.solution = spaced;
|
data.solution = spaced;
|
||||||
data.incorrect = 0;
|
data.incorrect = 0;
|
||||||
data.key = convertToKey(spaced);
|
data.key = convertToKey(spaced);
|
||||||
|
data.guesses = [];
|
||||||
|
|
||||||
// Tell the overlay(s) to start a new game
|
// Tell the overlay(s) to start a new game
|
||||||
request.server.app.io.to(channel).emit(`state`, {
|
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})`;
|
return `${data.current} (incorrect: ${data.incorrect}/${config.game.max_incorrect})`;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
export default route;
|
export default route;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue