Problem 52163. Peg Solitaire - Get Possible Moves
Consider following initial board; (1) indicates there is a peg and (0) indicates empty holes.
For this initial board, we can move;
- the peg located on (2,4) to down (2) direction.
- the peg located on (4,2) to right (6) direction
- the peg located on (6,4) to up (8) direction,
- the peg located on (4,6) to left (4) direction.
Write a function to list all the possible move for the given board.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
What is the next step in Conway's Life?
648 Solvers
-
Sum of first n terms of a harmonic progression
411 Solvers
-
Return the first and last characters of a character array
9412 Solvers
-
Find nearest prime number less than input number
700 Solvers
-
Change the sign of even index entries of the reversed vector
525 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!