From: Mazet Laurent Date: Tue, 4 Jun 2024 21:25:20 +0000 (+0200) Subject: spelling X-Git-Tag: v1.0~2 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=af88a5ad716cb48897ad6604d0be7b1315585e37;p=bs.git spelling --- 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 */