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();