]>
git.gir.st - solVItaire.git/blob - sol.h
4 #define SHORTHELP "%s [OPTIONS]\n"
6 #define LONGHELP_SPECIFIC ""
7 #define DIRECT_ADDR_KEYHELP \
8 " 1 .. 7: directly address tableu\n" \
9 " 8,9,0 : directly address stock/waste/foundation\n"
11 #define LONGHELP_SPECIFIC \
12 " -d(ifficulty) (eady|medium|hard)\n"
13 #define DIRECT_ADDR_KEYHELP \
14 " 1 .. 0: directly address tableu\n"
19 " -s(cheme) (color|mono|small)\n" \
24 " hjkl : move cursor\n" \
25 " space : select at cursor\n" \
26 " return: draw from stock\n" \
32 CLU_A
, DIA_A
, HEA_A
, SPA_A
,
33 CLU_2
, DIA_2
, HEA_2
, SPA_2
,
34 CLU_3
, DIA_3
, HEA_3
, SPA_3
,
35 CLU_4
, DIA_4
, HEA_4
, SPA_4
,
36 CLU_5
, DIA_5
, HEA_5
, SPA_5
,
37 CLU_6
, DIA_6
, HEA_6
, SPA_6
,
38 CLU_7
, DIA_7
, HEA_7
, SPA_7
,
39 CLU_8
, DIA_8
, HEA_8
, SPA_8
,
40 CLU_9
, DIA_9
, HEA_9
, SPA_9
,
41 CLU_X
, DIA_X
, HEA_X
, SPA_X
,
42 CLU_J
, DIA_J
, HEA_J
, SPA_J
,
43 CLU_Q
, DIA_Q
, HEA_Q
, SPA_Q
,
44 CLU_K
, DIA_K
, HEA_K
, SPA_K
,
77 OK
, /*move successful*/
87 /* WARN: stock must always follow immediately after `TAB_*`! */
88 #define TAB_MAX (STOCK-1)
102 #define WASTE 0; /* need it for get_cmd(), but don't count it in NUM_PLACES */
103 #elif defined KLONDIKE
127 typedef signed char card_t
;
131 int opt
; /* klondike: foundation id; spider: move nth movable card */
133 const struct cursor no_hi
= {-1, -1};
137 int find_top(card_t
* pile
);
138 int first_movable(card_t
* pile
);
139 void turn_over(card_t
* pile
);
141 int is_consecutive (card_t
* pile
, int pos
);
144 card_t
stack_take(void);
145 int t2f(int from
, int to
, int opt
);
146 int w2f(int from
, int to
, int opt
);
147 int s2w(int from
, int to
, int opt
);
148 int w2s(int from
, int to
, int opt
);
149 int f2t(int from
, int to
, int opt
);
150 int w2t(int from
, int to
, int opt
);
151 int t2t(int from
, int to
, int opt
);
153 void remove_if_complete (card_t
* pile
);
154 int t2t(int from
, int to
, int opt
);
155 int s2t(int from
, int to
, int opt
);
157 int nop(int from
, int to
, int opt
);
158 int get_cmd (int* from
, int* to
, int* opt
);
160 int is_movable(card_t
* pile
, int n
);
161 void print_hi(int invert
, int grey_bg
, int bold
, char* str
);
162 void print_table(const struct cursor
* active
, const struct cursor
* inactive
);
164 void append_undo (int n
, int f
, int t
);
165 void screen_setup (int enable
);
166 void raw_mode(int enable
);