From 64134cb9ad817fa7804bb66df5aad54d603d6af6 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Sat, 1 Jun 2024 23:40:04 +0200 Subject: [PATCH] add tests --- battleships.c | 5 +++-- display.c | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) 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; -- 2.30.2