add tests
authorLaurent Mazet <mazet@softndesign.org>
Sat, 1 Jun 2024 21:40:04 +0000 (23:40 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Sat, 1 Jun 2024 21:40:04 +0000 (23:40 +0200)
battleships.c
display.c

index 2c570fee58ae9ea6a175151dbf76c9978fe842a3..9b2655bba5eb290ad1b0148334fe7396a982b9eb 100644 (file)
@@ -15,7 +15,7 @@
 
 /* static variables */
 char *progname = NULL;
-char *version = "0.1";
+char *version = "0.9";
 
 int boats[9] = {1, 1, 1, 1, 2, 2, 3, 4, 0};
 
@@ -270,7 +270,8 @@ int main (int argc, char *argv[])
 
 /* test: battleships.exe -h | grep usage */
 /* test: battleships.exe -v 2>&1 | grep missing */
-/* test: battleships.exe -v 4 | grep "debug mode" */
+/* test: echo q | battleships.exe -v 4 | grep "debug mode" */
 /* test: battleships.exe _ 2>&1 | grep invalid */
+/* 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 */
 
 /* vim: set ts=4 sw=4 et: */
index e91111d82a2106eab2784f6cd1395202c635a4cb..b90ad6dce19599e547dba6d3bc985007b43ff14b 100644 (file)
--- a/display.c
+++ b/display.c
@@ -58,9 +58,6 @@ void displayboard (board_t *board, int xoffset, int yoffset, int mode, int show)
             } else {
                 c = board->tab[x + y * board->xsize];
                 switch (c) {
-                case 'B':
-                    setcolor (magenta);
-                    break;
                 case 'O':
                     setcolor (blue);
                     break;