New puzzle: `Inertia', originally written for Windows by Ben
[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
bf7ebf5a 20extern const game blackbox;
19ef4855 21extern const game cube;
6c04c334 22extern const game dominosa;
19ef4855 23extern const game fifteen;
f4afe206 24extern const game flip;
74476385 25extern const game guess;
81eef9aa 26extern const game inertia;
e3478a4b 27extern const game lightup;
6193da8d 28extern const game loopy;
c51c7de6 29extern const game map;
7959b517 30extern const game mines;
19ef4855 31extern const game net;
32extern const game netslide;
33extern const game pattern;
32ee875d 34extern const game pegs;
19ef4855 35extern const game rect;
e839f206 36extern const game samegame;
19ef4855 37extern const game sixteen;
f1010613 38extern const game slant;
1d8e8ad8 39extern const game solo;
9038fd11 40extern const game twiddle;
9d6c3859 41extern const game untangle;
19ef4855 42
43const game *gamelist[] = {
bf7ebf5a 44 &blackbox,
19ef4855 45 &cube,
6c04c334 46 &dominosa,
19ef4855 47 &fifteen,
f4afe206 48 &flip,
74476385 49 &guess,
81eef9aa 50 &inertia,
e3478a4b 51 &lightup,
6193da8d 52 &loopy,
c51c7de6 53 &map,
7959b517 54 &mines,
19ef4855 55 &net,
56 &netslide,
57 &pattern,
32ee875d 58 &pegs,
19ef4855 59 &rect,
e839f206 60 &samegame,
19ef4855 61 &sixteen,
f1010613 62 &slant,
1d8e8ad8 63 &solo,
9038fd11 64 &twiddle,
9d6c3859 65 &untangle,
19ef4855 66};
67
68const int gamecount = lenof(gamelist);