From 6cb0c9bd0c433ae586a01ab95d22b1a356183cd5 Mon Sep 17 00:00:00 2001 From: mateusz Date: Sun, 1 Sep 2024 18:04:05 +0400 Subject: [PATCH] chore: clean up Signed-off-by: mateusz --- context/game-context.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/context/game-context.tsx b/context/game-context.tsx index 16cc100..0b93edc 100644 --- a/context/game-context.tsx +++ b/context/game-context.tsx @@ -94,17 +94,11 @@ export default function GameProvider({ children }: PropsWithChildren) { return; } - if ( - x < maxIndex && - tiles[board[x][y]].value === tiles[board[x + 1][y]].value - ) { + if (tiles[board[x][y]].value === tiles[board[x + 1][y]].value) { return; } - if ( - y < maxIndex && - tiles[board[x][y]].value === tiles[board[x][y + 1]].value - ) { + if (tiles[board[x][y]].value === tiles[board[x][y + 1]].value) { return; } }