The Puzzle
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |