Peg Solitaire (also known as Hi-Q) has very simple rules. Pegs (red circles in this implementation) are allowed to jump over adjacent (vertically or horizontally) pegs. The peg that has been jumped over is removed.
Now, if you have played the game you know how hard it can be to win.
How about a Peg Solitare Solver - built in Delphi?
A great idea for the Fancy Delphi Application Contest ;-)
Peg Solitare Solver
Peg Solitare Solver computes solutions for the game peg solitaire. This is a board game for one player involving movement of pegs on a 7x7 board with 33 holes. A valid move is to jump a peg orthogonally over an adjacent peg into a hole two positions away and then to remove the jumped peg. The goal is to remove all pegs but one, and this one is to be in the middle of the board.The program uses a simple backtracking algorithm, and a few extra starting positions are included. To make replays easier, the moves are shown in a memo.
"Peg Solitare Solver" was submitted by "Andreas Dumont".
Do you have a FDA(C)? Submit your Delphi code to the Fancy Delphi Application Contest.


