Moving stack-related constants to the stack header file.
This commit is contained in:
		
							parent
							
								
									75d1e5f23b
								
							
						
					
					
						commit
						5adba921f9
					
				
							
								
								
									
										22
									
								
								lib/game.h
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								lib/game.h
									
									
									
									
									
								
							| @ -1,32 +1,12 @@ | ||||
| #ifndef GAME_H | ||||
| #define GAME_H | ||||
| 
 | ||||
| #include "stack.h" | ||||
| #include "deck.h" | ||||
| #include "cursor.h" | ||||
| 
 | ||||
| #define NUMBER_OF_CARDS 52 | ||||
| 
 | ||||
| #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; | ||||
|  | ||||
| @ -5,7 +5,6 @@ | ||||
| #include <string.h> | ||||
| #include <errno.h> | ||||
| #include "stack.h" | ||||
| #include "game.h" | ||||
| 
 | ||||
| void allocate_stack(struct stack **stack) { | ||||
|   if (!(*stack = malloc(sizeof(**stack)))) { | ||||
|  | ||||
							
								
								
									
										21
									
								
								lib/stack.h
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								lib/stack.h
									
									
									
									
									
								
							| @ -5,6 +5,27 @@ | ||||
| 
 | ||||
| #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; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user