The Puzzle

Aim of the game is to remove all pegs from the board by jumping over existing ones.
2K Downloads
Updated 11 Jul 2002

No License

On the board the gray squares represent 'pegs'. The black squares represent 'holes'. PC users will see 'holes' as a square marked 'X'. To make a move, click on a 'peg' one position away from a 'hole', with a 'peg' in between the two. After the move is made, the 'peg' jumps over its neighbor to occupy the 'hole'. The 'peg' that was in between the first 'peg' and the 'hole' is removed from the game board. Thus each move reduces the 'peg' count by one. The message box on the top right keeps track of the number of pegs left on the board.

The aim of the game is to remove as many 'pegs' as possible. Best play will leave one 'peg' on the board. Diagonal moves are not allowed. If you click on a 'peg' that can make a legal move, the 'peg' turns blue. PC users will see a '*' on the selected peg. To unselect, click on the selected 'peg' again. The message box on the top left will prompt you for moves.

Cite As

Deepak Gangadharan (2024). The Puzzle (https://www.mathworks.com/matlabcentral/fileexchange/1939-the-puzzle), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Strategy & Logic in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0