We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d1ae45 commit 9b2388dCopy full SHA for 9b2388d
workspaces/simon-game/src/app/components/App.tsx
@@ -4,8 +4,13 @@ import { Box } from "./Box.tsx";
4
import { playNote } from "../util/playNote.ts";
5
import { config } from "../constants.ts";
6
7
+function isSequenceCorrect(check: number[], correct: number[]): boolean {
8
+ return check.every((element, i) => element === correct[i]);
9
+}
10
+
11
export function App() {
12
const [playerMoves, setPlayerMoves] = useState<readonly number[]>([]);
13
+ console.log(isSequenceCorrect);
14
return (
15
<>
16
<div style={{ display: "flex", gap: 10 }}>
0 commit comments