From ffe12430b4215cbad17d44b7210f3acc435e5789 Mon Sep 17 00:00:00 2001 From: JiffyJuff Date: Thu, 12 Apr 2018 18:21:58 +0800 Subject: [PATCH] Added feature to skip question Skipping a question removes it from the deck. --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.c b/main.c index 0f2edeb..6061348 100644 --- a/main.c +++ b/main.c @@ -262,6 +262,13 @@ int test_card(struct Card **cards, int i, int size) { return QUIT; } + // If response is "\s", skip and remove from deck + if (strcmp(response, "\\s") == 0) { + printf("\n\n"); + free(response); + return TRUE; + } + // Creates a blank string of minimum length 12 for alignment int length = max(12, real_len(card.question)) + 1; char *space = malloc(sizeof(char) * length);