Fix Ultra Hard mode

This commit is contained in:
Lynn 2022-01-22 18:00:27 +01:00
parent 806eb9fe41
commit e07726f71c
2 changed files with 4 additions and 4 deletions

View file

@ -138,7 +138,7 @@ function App() {
[
`No restrictions on guesses.`,
`Wordle's "Hard Mode". Green letters must stay fixed, and yellow letters must be reused.`,
`An even stricter Hard Mode. Yellow letters must move away, and gray letters can't be reused.`,
`An even stricter Hard Mode. Yellow letters must move away from where they were clued.`,
][difficulty]
}
</div>

View file

@ -71,9 +71,9 @@ export function violation(
const upper = letter.toUpperCase();
const nth = ordinal(i + 1);
if (clue === Clue.Absent) {
if (difficulty === Difficulty.UltraHard && guess.includes(letter)) {
return "Guess can't contain " + upper;
}
// if (difficulty === Difficulty.UltraHard && guess.includes(letter)) {
// return "Guess can't contain " + upper;
// }
} else if (clue === Clue.Correct) {
if (guess[i] !== letter) {
return nth + " letter must be " + upper;