Created
May 10, 2025 09:43
-
-
Save hesan-aminiloo/4baf888c06120e1ebc22f8347055d240 to your computer and use it in GitHub Desktop.
Main memory game Application file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css' | |
import { Controls } from './components/Controls' | |
import { Lights } from './components/Lights' | |
import { Score } from './components/Score' | |
import { useGame } from './hooks/useGame' | |
function App() { | |
const { | |
blinkSeq, | |
isBlinking, | |
score, | |
resetHandler, | |
startHandler, | |
lightClickHandler, | |
} = useGame() | |
return ( | |
<> | |
<div className='bg-gray-800 h-screen'> | |
<Score score={score} /> | |
<Lights | |
blinkSeq={blinkSeq} | |
isBlinking={isBlinking} | |
onLightClick={lightClickHandler} | |
/> | |
<Controls | |
onReset={resetHandler} | |
onStart={startHandler} | |
/> | |
</div> | |
</> | |
) | |
} | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment