summaryrefslogtreecommitdiffstats
path: root/kpat/freecell-solver/preset.h
blob: 553e9d073fbdf0b22fe886b2fd33dfb238c45229 (plain)
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
/*
 * fcs.h - header file of the preset management functions for Freecell Solver.
 *
 * Written by Shlomi Fish ([email protected]), 2000
 *
 * This file is in the public domain (it's uncopyrighted).
 */

#ifndef FC_SOLVE__PRESET_H
#define FC_SOLVE__PRESET_H

#ifdef __cplusplus
extern "C" {
#endif

#include "fcs.h"

struct fcs_preset_struct
{
    int preset_id;
    int freecells_num;
    int stacks_num;
    int decks_num;

    int sequences_are_built_by;
    int unlimited_sequence_move;
    int empty_stacks_fill;

    char tests_order[FCS_TESTS_NUM*3+1];
    char allowed_tests[FCS_TESTS_NUM*3+1];
};

typedef struct fcs_preset_struct fcs_preset_t;

extern int freecell_solver_apply_preset_by_ptr(
    freecell_solver_instance_t * instance,
    const fcs_preset_t * preset_ptr
    );

extern int freecell_solver_apply_preset_by_name(
    freecell_solver_instance_t * instance,
    const char * name
    );

extern int freecell_solver_apply_tests_order(
    fcs_tests_order_t * tests_order,
    const char * string,
    char * * error_string
    );

extern int freecell_solver_get_preset_by_name(
    const char * name,
    const fcs_preset_t * * preset_ptr
    );

#define fcs_duplicate_preset(d,s) ((d) = (s))

#ifdef __cplusplus
}
#endif

#endif