Files
puzzles/list.c
Simon Tatham 6ada3841a1 New puzzle: `Map'. Vaguely original, for a change.
(This puzzle is theoretically printable, but I haven't added it in
print.py since there's rather a lot of painful processing required
to get from the game ID to the puzzle's visual appearance. It
probably won't become printable unless I get round to implementing a
more integrated printing architecture.)

[originally from svn r6186]
2005-08-13 10:43:26 +00:00

65 lines
1.4 KiB
C

/*
* list.c: List of puzzles.
*/
#include "puzzles.h"
/*
* The available games can be most easily enumerated by searching
* for the line in each game source file saying "#define thegame
* <gamename>". Hence, the following piece of shell/Perl should
* regenerate this list automatically:
perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print "extern const game $1;\n"' *.c
echo -e '\nconst game *gamelist[] = {'
perl -ne '/^#define thegame (\S+)/ and $1 ne "nullgame" and print " &$1,\n"' *.c
echo -e '};\n\nconst int gamecount = lenof(gamelist);'
*/
extern const game blackbox;
extern const game cube;
extern const game dominosa;
extern const game fifteen;
extern const game flip;
extern const game guess;
extern const game lightup;
extern const game map;
extern const game mines;
extern const game net;
extern const game netslide;
extern const game pattern;
extern const game pegs;
extern const game rect;
extern const game samegame;
extern const game sixteen;
extern const game slant;
extern const game solo;
extern const game twiddle;
extern const game untangle;
const game *gamelist[] = {
&blackbox,
&cube,
&dominosa,
&fifteen,
&flip,
&guess,
&lightup,
&map,
&mines,
&net,
&netslide,
&pattern,
&pegs,
&rect,
&samegame,
&sixteen,
&slant,
&solo,
&twiddle,
&untangle,
};
const int gamecount = lenof(gamelist);