-
Notifications
You must be signed in to change notification settings - Fork 11
/
config.h.dkds
151 lines (113 loc) · 3.77 KB
/
config.h.dkds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* This file is part of Freecell Solver. It is subject to the license terms in
* the COPYING.txt file found in the top-level directory of this distribution
* and at http://fc-solve.shlomifish.org/docs/distro/COPYING.html . No part of
* Freecell Solver, including this file, may be copied, modified, propagated,
* or distributed except according to the terms contained in the COPYING file.
*
* Copyright (c) 2000 Shlomi Fish
*/
/*
config.h - Configuration file for Freecell Solver
*/
#ifndef __CONFIG_H
#define __CONFIG_H
#ifdef _cplusplus
extern "C" {
#endif
/* #define DEBUG_STATES */
/* #define COMPACT_STATES */
#define INDIRECT_STACK_STATES
/* #define DIRECT_STATE_STORAGE */
/* #define INDIRECT_STATE_STORAGE */
/* #define TREE_STATE_STORAGE */
/* These macros are only applicable if TREE_STATE_STORAGE is defined */
/* #define LIBREDBLACK_TREE_IMPLEMENTATION */
/* #define AVL_AVL_TREE_IMPLEMENTATION */
/* #define AVL_REDBLACK_TREE_IMPLEMENTATION */
/* #define GLIB_TREE_IMPLEMENTATION */
/* #define DEBUG */
/* #define CARD_DEBUG_PRES */
/* Make sure one and only one of DEBUG_STATES and COMPACT_STATES is defined.
* The preferred is COMPACT_STATES because it occupies less memory and is
* faster.
*/
#if (!defined(DEBUG_STATES)) && (!defined(COMPACT_STATES)) && (!defined(INDIRECT_STACK_STATES))
#define COMPACT_STATES
#elif defined(COMPACT_STATES) && defined(DEBUG_STATES)
#undef DEBUG_STATES
#endif
/* Make sure that one and only one of DIRECT_STATE_STORAGE and
* INDIRECT_STATE_STORAGE is defined. The default is INDIRECT_STATE_STORAGE
* because it's faster.
*/
/* Recent Note:
*
* Basically, this code is obsolete because they (or TREE_STATE_STORAGE or
* HASH_STATE_STORAGE) are now defined in the Makefile or in the project's
* options of the IDE */
#if (!defined(DIRECT_STATE_STORAGE)) && (!defined(INDIRECT_STATE_STORAGE)) && (!defined(TREE_STATE_STORAGE)) && (!defined(HASH_STATE_STORAGE)) && (!defined(DB_FILE_STATE_STORAGE))
#define INDIRECT_STATE_STORAGE
#elif defined(DIRECT_STATE_STORAGE) && defined(INDIRECT_STATE_STORAGE)
#undef DIRECT_STATE_STORAGE
#ifdef TREE_STATE_STORAGE
#undef TREE_STATE_STORAGE
#endif
#elif defined(TREE_STATE_STORAGE)
#ifdef DIRECT_STATE_STORAGE
#undef DIRECT_STATE_STORAGE
#endif
#endif
/*
The sort margin size for the previous states array.
*/
#define PREV_STATES_SORT_MARGIN 32
/*
The amount prev_states grow by each time it each resized.
Should be greater than 0 and in order for the program to be
efficient, should be much bigger than
PREV_STATES_SORT_MARGIN.
*/
#define PREV_STATES_GROW_BY 128
/*
The amount the pack pointers array grows by. Shouldn't be too high
because it doesn't happen too often.
Doesn't apply for DIRECT_STATE_STORAGE.
*/
#define IA_STATE_PACKS_GROW_BY 32
/*
* The maximal number of Freecells. For efficiency's sake it should be a
* multiple of 4.
* */
#define MAX_NUM_FREECELLS 8
/*
* The maximal number of Stacks. For efficiency's sake it should be a
* multiple of 4.
* */
#define MAX_NUM_STACKS 12
/*
* The maximal number of initial cards that can be found in a stack.
* */
#define MAX_NUM_INITIAL_CARDS_IN_A_STACK 104
#define MAX_NUM_DECKS 2
/* #define FCS_NON_DFS */
#define FCS_METHOD_HARD_DFS 0
#define FCS_METHOD_SOFT_DFS 1
#define FCS_METHOD FCS_METHOD_HARD_DFS
/* #define FCS_METHOD FCS_METHOD_SOFT_DFS */
#define FCS_STACK_STORAGE_INTERNAL_HASH 0
#define FCS_STACK_STORAGE_LIBAVL_AVL_TREE 1
#define FCS_STACK_STORAGE_LIBAVL_REDBLACK_TREE 2
#define FCS_STACK_STORAGE_LIBREDBLACK_TREE 3
#define FCS_STACK_STORAGE_GLIB_TREE 4
#define FCS_STACK_STORAGE_GLIB_HASH 5
/*
It's inside an #ifndef so it will not override the makefile's setting.
*/
#ifndef FCS_STACK_STORAGE
#define FCS_STACK_STORAGE FCS_STACK_STORAGE_INTERNAL_HASH
#endif
#ifdef _cplusplus
}
#endif
#endif