From 6a35049609636cc7804652ff31df5a9ee139abc1 Mon Sep 17 00:00:00 2001 From: ThePendulum Date: Mon, 3 Jun 2024 01:57:44 +0200 Subject: [PATCH] Fixed orange highlight overwriting green highlight in wordle game. --- src/games/wordle.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/games/wordle.js b/src/games/wordle.js index a383562..d65f28a 100644 --- a/src/games/wordle.js +++ b/src/games/wordle.js @@ -113,7 +113,10 @@ function play(guess, context) { } if (wordle.word.includes(letter)) { - wordle.letters.set(letter, false); + if (wordle.letters.get(letter) !== true) { + wordle.letters.set(letter, false); + } + return [letter, alreadySeen ? null : false]; // repeating letter in the wrong place is not highlighted }