Update memory-game/components/MemoryGame.jsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/1500/head
prathoseraaj V 2 months ago committed by GitHub
parent 045314e5a1
commit 6f6d683838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,12 +22,12 @@ const MemoryGame = () => {
const [won, setWon] = useState(false);
const handleGridSize = (e) => {
const size = parseInt(e.target.value);
if (2 <= size && size <= 10 && (size * size) % 2 === 0) {
setGridSize(size);
}
};
const handleGridSize = (e) => {
const size = parseInt(e.target.value);
if (2 <= size && size <= 10 && (size * size) % 2 === 0) {
setGridSize(size);
}
};
const initializeGame = useCallback(() => {
const totalCards = gridSize * gridSize;

Loading…
Cancel
Save