Want to relax sometimes when working with MATLAB? Here I post an example of a game, invoked from the MATLAB environment to be played by pushing GUI buttons in a figure window. The game is very simple (looking) but not so easy to accomplish the goal. The purpose is to arrange 15 numbered squares in the 4*4 field (so that only one space is available) in the numbering order: 1,2,3,...,15. Only the squares adjacent to the empty space can be moved to this space at each step (by pressing their buttons).
Originally it is played with 15 plastic (or wooden) chips in a box, not the computer buttons. It is one one of the best simple games I know, much simpler to learn than anything else but still requires some thinking to do . (guess I was not smart enough to be a good chess player...). I used to play it as a kid (we called it "pyatnashki", means "fifteens" in Russian). I have no idea where it originally came from and how popular it was in other countries.
Kirill K. Pankratov (2023). Fifteens (https://www.mathworks.com/matlabcentral/fileexchange/1941-fifteens), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!