From af88a5ad716cb48897ad6604d0be7b1315585e37 Mon Sep 17 00:00:00 2001 From: Mazet Laurent Date: Tue, 4 Jun 2024 23:25:20 +0200 Subject: [PATCH] spelling --- battleships.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/battleships.c b/battleships.c index 60093c0..423b170 100644 --- a/battleships.c +++ b/battleships.c @@ -255,13 +255,13 @@ int main (int argc, char *argv[]) if (length == 0) { x = y = orient = 0; if (!findlocation (boardcomputer, 1, &x, &y, &orient, " S")) { - VERBOSE (WARNING, fprintf (stderr, "can't position for bomb %d\n", 1)); + VERBOSE (WARNING, fprintf (stderr, "can't find position for bomb %d\n", 1)); stop = 1; } displaylog (logs, "Send bomb on computer board", xlogs, ylogs); } else { if (!findlocation (boardhuman, length, &x, &y, &orient, " ")) { - VERBOSE (WARNING, fprintf (stderr, "can't position for boat %d\n", length)); + VERBOSE (WARNING, fprintf (stderr, "can't find position for boat %d\n", length)); stop = 1; } } @@ -270,7 +270,7 @@ int main (int argc, char *argv[]) displaylog (logs, "Computer ship hitted", xlogs, ylogs); } if (!findlocation (boardcomputer, 1, &x, &y, &orient, " S")) { - VERBOSE (WARNING, fprintf (stderr, "can't position for bomb %d\n", 1)); + VERBOSE (WARNING, fprintf (stderr, "can't find position for bomb %d\n", 1)); stop = 1; } if (testsunk (boardcomputer)) { @@ -321,6 +321,7 @@ int main (int argc, char *argv[]) /* test: battleships.exe -v 2>&1 | grep missing */ /* test: echo q | battleships.exe -v 4 | grep "debug mode" */ /* test: battleships.exe _ 2>&1 | grep invalid */ +/* test: echo -e 'ppppdpdpdpdpdpdpdpq' | battleships.exe */ /* test: echo -e '\n\n\n\n\t\nklllkkij \n\n\n\n\n \n\njjjkkil\n\t\n\nllk kji\n\t\nq' | battleships.exe */ /* test: (for i in `seq 1 210`; do echo -n p; done; echo q) | battleships.exe */ -- 2.30.2