Add WinHelp topic
[sgt/puzzles] / list.c
CommitLineData
19ef4855 1/*
2 * list.c: List of puzzles.
3 */
4
5#include "puzzles.h"
6
7/*
8 * The available games can be most easily enumerated by searching
9 * for the line in each game source file saying "#define thegame
10 * <gamename>". Hence, the following piece of shell/Perl should
11 * regenerate this list automatically:
12
13perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print "extern const game $1;\n"' *.c
14echo -e '\nconst game *gamelist[] = {'
15perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print " &$1,\n"' *.c
16echo -e '};\n\nconst int gamecount = lenof(gamelist);'
17
18 */
19
20extern const game cube;
21extern const game fifteen;
f4afe206 22extern const game flip;
7959b517 23extern const game mines;
19ef4855 24extern const game net;
25extern const game netslide;
26extern const game pattern;
27extern const game rect;
e839f206 28extern const game samegame;
19ef4855 29extern const game sixteen;
1d8e8ad8 30extern const game solo;
9038fd11 31extern const game twiddle;
19ef4855 32
33const game *gamelist[] = {
34 &cube,
35 &fifteen,
f4afe206 36 &flip,
7959b517 37 &mines,
19ef4855 38 &net,
39 &netslide,
40 &pattern,
41 &rect,
e839f206 42 &samegame,
19ef4855 43 &sixteen,
1d8e8ad8 44 &solo,
9038fd11 45 &twiddle,
19ef4855 46};
47
48const int gamecount = lenof(gamelist);