From dcab55f85343e50c56b096d6c38795b86b66ef43 Mon Sep 17 00:00:00 2001 From: Murilo Pereira Date: Sun, 20 Feb 2011 18:45:15 -0300 Subject: [PATCH] Finished putting stuff where they belong. --- lib/display.c | 1 + lib/game.c | 1 - lib/game.h | 24 ++++++++++++++++++++++++ lib/keyboard.c | 2 +- lib/stack.h | 23 ----------------------- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/display.c b/lib/display.c index 727be23..5782709 100644 --- a/lib/display.c +++ b/lib/display.c @@ -4,6 +4,7 @@ #include #include #include +#include "game.h" #include "display.h" static char *card_suit(enum suit suit) { diff --git a/lib/game.c b/lib/game.c index 40b0ca9..9c88b6b 100644 --- a/lib/game.c +++ b/lib/game.c @@ -4,7 +4,6 @@ #include #include #include -#include "stack.h" #include "display.h" #include "util.h" #include "game.h" diff --git a/lib/game.h b/lib/game.h index ec5e85d..77be4d1 100644 --- a/lib/game.h +++ b/lib/game.h @@ -1,11 +1,35 @@ #ifndef GAME_H #define GAME_H +#include "stack.h" #include "deck.h" #include "cursor.h" #define NUMBER_OF_CARDS 52 +#define MANEUVRE_STACKS_STARTING_Y 7 + +#define STOCK_STARTING_X 1 +#define STOCK_STARTING_Y 1 + +#define WASTE_PILE_STARTING_X 9 +#define WASTE_PILE_STARTING_Y 1 + +#define FOUNDATION_STARTING_Y 1 +#define FOUNDATION_0_STARTING_X 25 +#define FOUNDATION_1_STARTING_X 33 +#define FOUNDATION_2_STARTING_X 41 +#define FOUNDATION_3_STARTING_X 49 + +#define MANEUVRE_STARTING_Y 9 +#define MANEUVRE_0_STARTING_X 1 +#define MANEUVRE_1_STARTING_X 9 +#define MANEUVRE_2_STARTING_X 17 +#define MANEUVRE_3_STARTING_X 25 +#define MANEUVRE_4_STARTING_X 33 +#define MANEUVRE_5_STARTING_X 41 +#define MANEUVRE_6_STARTING_X 49 + extern const char *program_name; struct deck *deck; struct cursor *cursor; diff --git a/lib/keyboard.c b/lib/keyboard.c index ea1ac6a..5f38845 100644 --- a/lib/keyboard.c +++ b/lib/keyboard.c @@ -1,5 +1,5 @@ #include "card.h" -#include "stack.h" +#include "game.h" #include "display.h" #include "keyboard.h" diff --git a/lib/stack.h b/lib/stack.h index e4001ab..6ca832f 100644 --- a/lib/stack.h +++ b/lib/stack.h @@ -3,29 +3,6 @@ #include "card.h" -#define MANEUVRE_STACKS_STARTING_Y 7 - -#define STOCK_STARTING_X 1 -#define STOCK_STARTING_Y 1 - -#define WASTE_PILE_STARTING_X 9 -#define WASTE_PILE_STARTING_Y 1 - -#define FOUNDATION_STARTING_Y 1 -#define FOUNDATION_0_STARTING_X 25 -#define FOUNDATION_1_STARTING_X 33 -#define FOUNDATION_2_STARTING_X 41 -#define FOUNDATION_3_STARTING_X 49 - -#define MANEUVRE_STARTING_Y 9 -#define MANEUVRE_0_STARTING_X 1 -#define MANEUVRE_1_STARTING_X 9 -#define MANEUVRE_2_STARTING_X 17 -#define MANEUVRE_3_STARTING_X 25 -#define MANEUVRE_4_STARTING_X 33 -#define MANEUVRE_5_STARTING_X 41 -#define MANEUVRE_6_STARTING_X 49 - struct stack { struct card *card; struct stack *next;