From e8d31a93aabc9d6abd43e08b554d43e712a65cad Mon Sep 17 00:00:00 2001 From: prathoseraaj V <146630697+prathoseraaj@users.noreply.github.com> Date: Fri, 3 Oct 2025 15:01:19 +0530 Subject: [PATCH] Update memory-game/components/MemoryGame.jsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- memory-game/components/MemoryGame.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memory-game/components/MemoryGame.jsx b/memory-game/components/MemoryGame.jsx index a3d128a5..fd433a8f 100644 --- a/memory-game/components/MemoryGame.jsx +++ b/memory-game/components/MemoryGame.jsx @@ -25,11 +25,11 @@ const MemoryGame = () => { const handleGridSize = (e) => { const size = parseInt(e.target.value); - if (2 <= size && size <= 10 && (size * size) % 2 === 0) { + if (2 <= size && size <= 10 && (size % 2 === 0)) { setGridSize(size); setError(""); } else { - setError("Please enter a grid size where gridSize x gridSize is even (e.g. 2, 4, 6, 8, 10)"); + setError("Please enter a grid size where gridSize is even (e.g. 2, 4, 6, 8, 10)"); } };