Peg Solitaire implementation, complete with a random board

generator. The generator is lacking in almost any kind of finesse,
but it produces puzzles which at least _I_ find plausibly puzzling.

[originally from svn r6052]
This commit is contained in:
Simon Tatham
2005-07-04 19:42:55 +00:00
parent aae029926f
commit 97e93dbfff
3 changed files with 1111 additions and 1 deletions

5
Recipe
View File

@ -19,9 +19,10 @@ NET = net tree234
NETSLIDE = netslide tree234 NETSLIDE = netslide tree234
MINES = mines tree234 MINES = mines tree234
FLIP = flip tree234 FLIP = flip tree234
PEGS = pegs tree234
ALL = list NET NETSLIDE cube fifteen sixteen rect pattern solo twiddle ALL = list NET NETSLIDE cube fifteen sixteen rect pattern solo twiddle
+ MINES samegame FLIP guess + MINES samegame FLIP guess PEGS
net : [X] gtk COMMON NET net : [X] gtk COMMON NET
netslide : [X] gtk COMMON NETSLIDE netslide : [X] gtk COMMON NETSLIDE
@ -36,6 +37,7 @@ mines : [X] gtk COMMON MINES
samegame : [X] gtk COMMON samegame samegame : [X] gtk COMMON samegame
flip : [X] gtk COMMON FLIP flip : [X] gtk COMMON FLIP
guess : [X] gtk COMMON guess guess : [X] gtk COMMON guess
pegs : [X] gtk COMMON PEGS
# The Windows Net shouldn't be called `net.exe' since Windows # The Windows Net shouldn't be called `net.exe' since Windows
# already has a reasonably important utility program by that name! # already has a reasonably important utility program by that name!
@ -52,6 +54,7 @@ mines : [G] WINDOWS COMMON MINES
samegame : [G] WINDOWS COMMON samegame samegame : [G] WINDOWS COMMON samegame
flip : [G] WINDOWS COMMON FLIP flip : [G] WINDOWS COMMON FLIP
guess : [G] WINDOWS COMMON guess guess : [G] WINDOWS COMMON guess
pegs : [G] WINDOWS COMMON PEGS
# Mac OS X unified application containing all the puzzles. # Mac OS X unified application containing all the puzzles.
Puzzles : [MX] osx osx.icns osx-info.plist COMMON ALL Puzzles : [MX] osx osx.icns osx-info.plist COMMON ALL

2
list.c
View File

@ -25,6 +25,7 @@ extern const game mines;
extern const game net; extern const game net;
extern const game netslide; extern const game netslide;
extern const game pattern; extern const game pattern;
extern const game pegs;
extern const game rect; extern const game rect;
extern const game samegame; extern const game samegame;
extern const game sixteen; extern const game sixteen;
@ -40,6 +41,7 @@ const game *gamelist[] = {
&net, &net,
&netslide, &netslide,
&pattern, &pattern,
&pegs,
&rect, &rect,
&samegame, &samegame,
&sixteen, &sixteen,

1105
pegs.c Normal file

File diff suppressed because it is too large Load Diff