From ff7047bd03751ad74b1a0b90bc40e1082ba9d1ea Mon Sep 17 00:00:00 2001 From: Laurent MAZET Date: Mon, 3 Jun 2024 13:26:49 +0200 Subject: [PATCH] fix moves (2) --- battleships.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/battleships.c b/battleships.c index babcf06..00c2019 100644 --- a/battleships.c +++ b/battleships.c @@ -195,7 +195,7 @@ int main (int argc, char *argv[]) } } else { int t; - for (t = y - 1; t >= 0; t--) { + for (t = x - 1; t >= 0; t--) { if (testlocation (boardcomputer, 1, t, y, orient, " S")) { x = t; break; -- 2.30.2