aboutsummaryrefslogtreecommitdiff
path: root/src/cubetypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cubetypes.h')
-rw-r--r--src/cubetypes.h64
1 files changed, 14 insertions, 50 deletions
diff --git a/src/cubetypes.h b/src/cubetypes.h
index cf6b7d5..fa19f6c 100644
--- a/src/cubetypes.h
+++ b/src/cubetypes.h
@@ -84,7 +84,7 @@ trans
84typedef struct alg Alg; 84typedef struct alg Alg;
85typedef struct alglist AlgList; 85typedef struct alglist AlgList;
86typedef struct alglistnode AlgListNode; 86typedef struct alglistnode AlgListNode;
87typedef struct block Block; 87typedef struct choicestep ChoiceStep;
88typedef struct command Command; 88typedef struct command Command;
89typedef struct commandargs CommandArgs; 89typedef struct commandargs CommandArgs;
90typedef struct coordinate Coordinate; 90typedef struct coordinate Coordinate;
@@ -97,13 +97,14 @@ typedef struct pdgendata PDGenData;
97typedef struct prunedata PruneData; 97typedef struct prunedata PruneData;
98typedef struct solveoptions SolveOptions; 98typedef struct solveoptions SolveOptions;
99typedef struct step Step; 99typedef struct step Step;
100typedef struct stepalt StepAlt;
101typedef struct symdata SymData; 100typedef struct symdata SymData;
102typedef struct threaddatasolve ThreadDataSolve; 101typedef struct threaddatasolve ThreadDataSolve;
103typedef struct threaddatagenpt ThreadDataGenpt; 102typedef struct threaddatagenpt ThreadDataGenpt;
104typedef struct transgroup TransGroup; 103typedef struct transgroup TransGroup;
105 104
106typedef bool (*Checker) (Cube *); 105typedef bool (*Checker) (Cube *);
106typedef bool (*DfsMover) (DfsArg *);
107typedef void (*DfsExtraCopier) (void *, void *);
107typedef bool (*Validator) (Alg *); 108typedef bool (*Validator) (Alg *);
108typedef void (*Exec) (CommandArgs *); 109typedef void (*Exec) (CommandArgs *);
109typedef CommandArgs * (*ArgParser) (int, char **); 110typedef CommandArgs * (*ArgParser) (int, char **);
@@ -137,11 +138,13 @@ alglistnode
137}; 138};
138 139
139struct 140struct
140block 141choicestep
141{ 142{
142 bool edge[12]; 143 char * shortname;
143 bool corner[8]; 144 char * name;
144 bool center[6]; 145 Step * step[99];
146 Trans t[99];
147 char * ready_msg;
145}; 148};
146 149
147struct 150struct
@@ -160,7 +163,7 @@ commandargs
160 bool success; 163 bool success;
161 Alg * scramble; 164 Alg * scramble;
162 SolveOptions * opts; 165 SolveOptions * opts;
163 Step * step; 166 ChoiceStep * cs;
164 Command * command; /* For help */ 167 Command * command; /* For help */
165 int n; 168 int n;
166 char scrtype[20]; 169 char scrtype[20];
@@ -210,7 +213,7 @@ dfsarg
210 Cube * cube; 213 Cube * cube;
211 Movable ind[MAX_N_COORD]; 214 Movable ind[MAX_N_COORD];
212 Trans t; 215 Trans t;
213 StepAlt * sa; 216 Step * s;
214 SolveOptions * opts; 217 SolveOptions * opts;
215 int d; 218 int d;
216 int bound; 219 int bound;
@@ -220,6 +223,7 @@ dfsarg
220 AlgList * sols; 223 AlgList * sols;
221 pthread_mutex_t * sols_mutex; 224 pthread_mutex_t * sols_mutex;
222 Alg * current_alg; 225 Alg * current_alg;
226 void * extra;
223}; 227};
224 228
225struct 229struct
@@ -245,7 +249,6 @@ pdgendata
245{ 249{
246 Coordinate * coord; 250 Coordinate * coord;
247 Moveset * moveset; 251 Moveset * moveset;
248 bool compact;
249 PruneData * pd; 252 PruneData * pd;
250}; 253};
251 254
@@ -256,10 +259,7 @@ prunedata
256 uint64_t n; 259 uint64_t n;
257 Coordinate * coord; 260 Coordinate * coord;
258 Moveset * moveset; 261 Moveset * moveset;
259 bool compact;
260 int base;
261 uint64_t count[16]; 262 uint64_t count[16];
262 uint64_t fbmod;
263}; 263};
264 264
265struct 265struct
@@ -280,54 +280,18 @@ solveoptions
280struct 280struct
281step 281step
282{ 282{
283 char * shortname;
284 char * name;
285 StepAlt * alt[99];
286 Trans t[99];
287 char * ready_msg;
288};
289
290struct
291stepalt
292{
293 Checker ready; 283 Checker ready;
294 bool final; 284 bool final;
295 Moveset * moveset; 285 Moveset * moveset;
296 /* Just a comment, (TODO: remove this): moveset is really a stepalt
297 * property, because for example we may want to define a "fingertrick
298 * friendly ZBLL" step, where we allow either <R U D> or <R U F> as
299 * movesets (or similar) */
300 int n_coord; 286 int n_coord;
301 Coordinate * coord[MAX_N_COORD]; 287 Coordinate * coord[MAX_N_COORD];
302 Trans coord_trans[MAX_N_COORD]; 288 Trans coord_trans[MAX_N_COORD];
303 PruneData * pd[MAX_N_COORD]; 289 PruneData * pd[MAX_N_COORD];
304 bool compact_pd[MAX_N_COORD];
305 Coordinate * fallback_coord[MAX_N_COORD];
306 PruneData * fallback_pd[MAX_N_COORD];
307 uint64_t fbmod[MAX_N_COORD];
308 int n_dbtrick;
309 int dbtrick[MAX_N_COORD][3];
310 Validator is_valid; 290 Validator is_valid;
291 DfsMover custom_move_checkstop;
292 DfsExtraCopier copy_extra;
311}; 293};
312 294
313/*
314struct
315symdata
316{
317 char * filename;
318 bool generated;
319 Coordinate * coord;
320 Coordinate * sym_coord;
321 int ntrans;
322 Trans * trans;
323 uint64_t * class;
324 uint64_t * unsym;
325 Trans * transtorep;
326 uint64_t * selfsim;
327};
328*/
329
330
331struct 295struct
332threaddatasolve 296threaddatasolve
333{ 297{

Generated with cgit - Back to sebastiano.tronto.net