From 6cb6b2f71a028ff7ee03947d9520750b993afed4 Mon Sep 17 00:00:00 2001 From: alberr_b0yyy Date: Thu, 12 Jun 2025 13:21:22 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20sur=20blanc=20corrects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index b032c8a..fb9dcb5 100644 --- a/main.c +++ b/main.c @@ -159,7 +159,7 @@ int controls() { } break; case 106: // j - if (y < 7 && (piece_color[y][x - 1] == 1 || piece_color[y][x - 1] == 2)) { + if (y < 7 && (piece_color[y + 1][x] == 1 || piece_color[y + 1][x] == 2)) { y++; y_direction++; piece_selection(); @@ -171,7 +171,7 @@ int controls() { } break; case 107: // k - if (y > 6 && (piece_color[y][x - 1] == 1 || piece_color[y][x - 1] == 2)) { + if (y > 6 && (piece_color[y - 1][x] == 1 || piece_color[y - 1][x] == 2)) { y--; y_direction = -1; piece_selection(); @@ -183,7 +183,7 @@ int controls() { } break; case 108: // l - if (x < 7 && (piece_color[y][x - 1] == 1 || piece_color[y][x - 1] == 2)) { + if (x < 7 && (piece_color[y][x + 1] == 1 || piece_color[y][x + 1] == 2)) { x++; x_direction++; piece_selection();