Skip to content

Commit

Permalink
Easy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nmsimons committed Nov 12, 2023
1 parent 2a97eca commit 16c206e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function main() {
if (containerId.length == 0) {
const used: { x: number; y: number }[] = [];
let id = 0;
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'HELLOWORLD'
.repeat(500)
.split('')
.map((character) => {
Expand Down
11 changes: 6 additions & 5 deletions src/react_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ function TopLetter(props: { app: App; letter: Letter }): JSX.Element {
const [isWinner, setIsWinner] = useState(false);

useEffect(() => {
const topRow = props.app.word
.map((letter) => {
return letter.character;
})
.join('');
if (
props.app.word
.map((letter) => {
return letter.character;
})
.join('') == 'HELLO'
topRow == 'HELLO' || topRow == 'HELLOWORLD'
) {
setIsWinner(true);
} else {
Expand Down

0 comments on commit 16c206e

Please sign in to comment.