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;
}
}
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)) {
/* 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 */