0
0
Fork 0

Add win state

This commit is contained in:
Oliver-Akins 2023-01-19 22:55:52 -06:00
parent 7d4120447a
commit 083e595d2a

View file

@ -24,6 +24,10 @@ const route: ServerRoute = {
if (data.key[guess] != null) { if (data.key[guess] != null) {
data.current = addLetter(data.key, data.current, guess); data.current = addLetter(data.key, data.current, guess);
if (data.current == data.solution) {
return `Congrats! You won. Merry Chatmanmas!`;
};
} else { } else {
data.incorrect++; data.incorrect++;
}; };