From: Laurent MAZET Date: Mon, 3 Jun 2024 11:26:49 +0000 (+0200) Subject: fix moves (2) X-Git-Tag: v1.0~4 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=ff7047bd03751ad74b1a0b90bc40e1082ba9d1ea;p=bs.git fix moves (2) --- 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;