

# undo move and back track when stuck! NB. Traditional Peg Solitaire (English Board), that you can also carry and play anywhere, easy to print and easy to assemble Download free 3D printable STL. board = AddPeg(board,land) # board order changes! NB. saveboard = board # for back tracking NB. if IsPeg(board,over) and not IsPeg(board,land): NB. for peg in xrange(1,16): # try in numeric order not board order NB. There are two different types of boards that are commonly used. # try a move for each peg on the board NB. Peg solitaire is a board game that involves moving pegs on the board that start with one single hole. This is the first known reference to the game in print. algorithm immutable N = immutable G =, , ,] string b2s ( in int n ) pure JumpMoves =: a :, ( ( NB.# NB.# Recursively solve the problem NB.# NB.def Solve(board): NB. Peg solitaire (or Solo Noble) is a board game for one player involving movement of pegs on a. to land on #.\n".format(hex(peg), hex(over), hex(land))) The board shape itself need not be triangular although this is the most common shape.

In triangular peg solitaire the holes in the board are taken from an equilateral triangular lattice. I IsPeg(board, over) & !IsPeg(board, land) Triangular peg solitaire is a popular puzzle most commonly played on the 15-hole board shown on the left.
