Removed noob debugging.
This commit is contained in:
		
							parent
							
								
									e8cf7b92a0
								
							
						
					
					
						commit
						ddeb3d335f
					
				
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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 | ||||
|  | ||||
| @ -1,42 +0,0 @@ | ||||
| #include <stdio.h> | ||||
| #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; | ||||
| } | ||||
| @ -1,8 +0,0 @@ | ||||
| #ifndef CARD_DEBUG_H | ||||
| #define CARD_DEBUG_H | ||||
| 
 | ||||
| #include "../lib/card.h" | ||||
| 
 | ||||
| void print_card(struct card *); | ||||
| 
 | ||||
| #endif | ||||
| @ -1,49 +0,0 @@ | ||||
| #include <stdio.h> | ||||
| #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; | ||||
| } | ||||
| @ -1,8 +0,0 @@ | ||||
| #ifndef DECK_DEBUG_H | ||||
| #define DECK_DEBUG_H | ||||
| 
 | ||||
| #include "../lib/deck.h" | ||||
| 
 | ||||
| void print_deck(struct deck *); | ||||
| 
 | ||||
| #endif | ||||
| @ -1,17 +0,0 @@ | ||||
| #include <stdio.h> | ||||
| #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; | ||||
| } | ||||
| @ -1,8 +0,0 @@ | ||||
| #ifndef STACK_DEBUG_H | ||||
| #define STACK_DEBUG_H | ||||
| 
 | ||||
| #include "../lib/stack.h" | ||||
| 
 | ||||
| void print_stack(struct stack *); | ||||
| 
 | ||||
| #endif | ||||
| @ -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, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user