From: Laurent Mazet Date: Sat, 1 Jun 2024 21:40:04 +0000 (+0200) Subject: add tests X-Git-Tag: v1.0~10 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=64134cb9ad817fa7804bb66df5aad54d603d6af6;p=bs.git add tests --- diff --git a/battleships.c b/battleships.c index 2c570fe..9b2655b 100644 --- a/battleships.c +++ b/battleships.c @@ -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: */ diff --git a/display.c b/display.c index e91111d..b90ad6d 100644 --- 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;