diff --git a/Makefile b/Makefile index 4b9983d..2f5b505 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ LDFLAGS = -lncursesw EXECUTABLE = bin/ttysolitaire LIB_DIR = lib -DEBUG_DIR = debug SRC = ${LIB_DIR}/ttysolitaire.c LIB_OBJECTS = ${LIB_DIR}/frame.o \ ${LIB_DIR}/card.o \ @@ -15,9 +14,6 @@ LIB_OBJECTS = ${LIB_DIR}/frame.o \ ${LIB_DIR}/keyboard.o \ ${LIB_DIR}/display.o \ ${LIB_DIR}/game.o \ - ${DEBUG_DIR}/card_debug.o \ - ${DEBUG_DIR}/stack_debug.o \ - ${DEBUG_DIR}/deck_debug.o \ TEST_EXECUTABLE = bin/ttysolitaire_test TEST_DIR = test diff --git a/debug/card_debug.c b/debug/card_debug.c deleted file mode 100644 index a83782a..0000000 --- a/debug/card_debug.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include "card_debug.h" - -void print_card(struct card *card) { - switch (card->face) { - case NO_FACE: printf("No face "); break; - case COVERED: printf("Covered "); break; - case EXPOSED: printf("Exposed "); break; - default : printf("? "); - } - - switch (card->value) { - case NO_VALUE: printf(", no value "); break; - case TWO : printf("two "); break; - case THREE : printf("three "); break; - case FOUR : printf("four "); break; - case FIVE : printf("five "); break; - case SIX : printf("six "); break; - case SEVEN : printf("seven "); break; - case EIGHT : printf("eight "); break; - case NINE : printf("nine "); break; - case TEN : printf("ten "); break; - case JACK : printf("jack "); break; - case QUEEN : printf("queen "); break; - case KING : printf("king "); break; - case ACE : printf("ace "); break; - default : printf("? "); - } - - switch (card->suit) { - case NO_SUIT : printf(", no suit "); break; - case DIAMONDS: printf("of diamonds "); break; - case SPADES : printf("of spades "); break; - case HEARTS : printf("of hearts "); break; - case CLUBS : printf("of clubs "); break; - } - - printf("at y:%d x:%d, ", card->frame->start_y, card->frame->start_x); - printf("with width:%d height:%d\n", FRAME_WIDTH, FRAME_HEIGHT); - - return; -} diff --git a/debug/card_debug.h b/debug/card_debug.h deleted file mode 100644 index 56edd26..0000000 --- a/debug/card_debug.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CARD_DEBUG_H -#define CARD_DEBUG_H - -#include "../lib/card.h" - -void print_card(struct card *); - -#endif diff --git a/debug/deck_debug.c b/debug/deck_debug.c deleted file mode 100644 index 1cd58bf..0000000 --- a/debug/deck_debug.c +++ /dev/null @@ -1,49 +0,0 @@ -#include -#include "stack_debug.h" -#include "deck_debug.h" - -void print_deck(struct deck *deck) { - puts("stock"); - print_stack(deck->stock); - puts(""); - puts("waste_pile"); - print_stack(deck->waste_pile); - puts(""); - - puts("foundation_0"); - print_stack(deck->foundation_0); - puts(""); - puts("foundation_1"); - print_stack(deck->foundation_1); - puts(""); - puts("foundation_2"); - print_stack(deck->foundation_2); - puts(""); - puts("foundation_3"); - print_stack(deck->foundation_3); - puts(""); - - puts("maneuvre_0"); - print_stack(deck->maneuvre_0); - puts(""); - puts("maneuvre_1"); - print_stack(deck->maneuvre_1); - puts(""); - puts("maneuvre_2"); - print_stack(deck->maneuvre_2); - puts(""); - puts("maneuvre_3"); - print_stack(deck->maneuvre_3); - puts(""); - puts("maneuvre_4"); - print_stack(deck->maneuvre_4); - puts(""); - puts("maneuvre_5"); - print_stack(deck->maneuvre_5); - puts(""); - puts("maneuvre_6"); - print_stack(deck->maneuvre_6); - puts(""); - - return; -} diff --git a/debug/deck_debug.h b/debug/deck_debug.h deleted file mode 100644 index 57d3584..0000000 --- a/debug/deck_debug.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef DECK_DEBUG_H -#define DECK_DEBUG_H - -#include "../lib/deck.h" - -void print_deck(struct deck *); - -#endif diff --git a/debug/stack_debug.c b/debug/stack_debug.c deleted file mode 100644 index d60e656..0000000 --- a/debug/stack_debug.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include "card_debug.h" -#include "stack_debug.h" - -void print_stack(struct stack *stack) { - if (empty(stack)) { - printf("Empty stack\n"); - } else { - struct stack *iterator = stack; - while (iterator != NULL) { - print_card(iterator->card); - iterator = iterator->next; - } - } - - return; -} diff --git a/debug/stack_debug.h b/debug/stack_debug.h deleted file mode 100644 index 55ffb6c..0000000 --- a/debug/stack_debug.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef STACK_DEBUG_H -#define STACK_DEBUG_H - -#include "../lib/stack.h" - -void print_stack(struct stack *); - -#endif diff --git a/lib/game.c b/lib/game.c index 61caec8..5fe891c 100644 --- a/lib/game.c +++ b/lib/game.c @@ -8,7 +8,6 @@ #include "display.h" #include "util.h" #include "game.h" -#include "../debug/deck_debug.h" // noob debugging static void set_stacks_initial_coordinates(struct deck *deck) { set_frame(deck->stock->card->frame,