Skip to content

Commit 5db13f3

Browse files
committed
Avoid overwriting green letters
1 parent cc77e42 commit 5db13f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

model.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ func (m *model) viewGridRowFilled(word [numChars]byte) string {
287287

288288
// Mark keyStatusPresent.
289289
for i := 0; i < numChars; i++ {
290+
if keyStates[i] == keyStateCorrect {
291+
continue
292+
}
290293
if foundIdx := bytes.IndexByte(letters[:], word[i]); foundIdx != -1 {
291294
keyStates[i] = keyStatePresent
292295
letters[foundIdx] = 0

0 commit comments

Comments
 (0)