
This is a program found in a page provided by Gene Wright.

The address is:


http://www.rskey.org/gene/calcmuseum/67pegged.htm


The original program was written by Craig Pearce.


I fixed some bugs and implemented peg type 1 jumps to left
and peg type 2 jumps to right.

So, each peg may jumps in both directions provided that the
place of destiny is empty.

"0" is the empty place.


Keys:
-----
A: Long jump to right
B: Short jump to right
C: Short jump to left
D: Long jump to left



A typical game is:


- Load the program.

Play with 3 pegs of type "1" and 3 pegs of type "2"


Press:
3 [R/S]   Display:  0.1110222
[B]       Display:  0.1101222
[D]       Display:  0.1121022
[B]       Display:  0.1120122
[D]       Display:  0.1122102
[B]       Display:  0.1122012
[D]       Display:  0.1122210
[B]       Display:  0.1122201  The first peg has arrived!.
[B]       Display:  0.1122021  A peg of type "2" returns to right ! 
[A]       Display:  0.1102221  Reverse long jump of a type 2 peg
[B]       Display:  0.1012221  The second type 1 peg advances to right
[D]       Display:  0.1210221
[B]       Display:  0.1201221
[B]       Display:  0.1021221
[B]       Display:  0.0121221
[D]       Display:  0.2101221  The first type 2 peg arrives to left!
[D]       Display:  0.2121021
[C]       Display:  0.2121201
[A]       Display:  0.2120211  The second type 1 peg arrives to right.
[A]       Display:  0.2021211  Long jump to right of the last type 1 peg.
[C]       Display:  0.2201211  The second type 2 peg arrives.
[D]       Display:  0.2221011  The last type 2 peg arrives.
[B]       Display:  0.2220111  The last type 1 peg arrives.
          Display:  22         Number of moves.


This game may be completed using less moves. Try it!


