diff --git a/web/pages/wordle/index.tsx b/web/pages/wordle/index.tsx index b80438fd..6e25e712 100644 --- a/web/pages/wordle/index.tsx +++ b/web/pages/wordle/index.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react' import { Page } from '../../components/page' import { Title } from '../../components/title' // From https://github.com/lynn/hello-wordl @@ -11,15 +12,10 @@ export default function Wordle() { // const dict = dictionary.filter((word) => word.length === WORD_LENGTH) const words = targets.filter((word) => word.length === WORD_LENGTH) - const pastGuesses: PastGuess[] = [ - // From https://hellowordl.net/?challenge=aGFyZHk - // { guess: 'sheep', result: 'BYBBB' }, - // { guess: 'butch', result: 'BBBBY' }, - // { guess: 'hydra', result: 'GYYYY' }, - // Answer: hardy - { guess: 'snowy', result: 'BBBYB' }, - { guess: 'wheel', result: 'GYBBB' }, - ] + const [input, setInput] = useState('') + + const pastGuesses: PastGuess[] = parsePastGuesses(input) + const placeholder = 'e.g.\nstage BBYBB\nlucre YYGYY' const valids = validHardMode(words, pastGuesses) @@ -34,7 +30,12 @@ export default function Wordle() { Actually for{' '} https://hellowordl.net/

Past guesses:

-
{JSON.stringify(pastGuesses, null, 2)}
+