GUI to set up and score three sizes of tic-tac-toe

A hand-coded GUI with no callbacks. Functions pass and return a structure within event loops.
2K Downloads
Updated 1 Sep 2016

View License

Straight tic-tac-toe, with options to play an opponent (not computer, which only keeps score) on 3x3, 4x4 and 5x5 boards. The first is of course trivial, the last two are impossible to win unless scoring can be done for sub-runs and blocks, which might be pretty interesting.
Fiddle with the scoring mechanism to see if you can make the larger games worth playing. I don't have time to spend on it. Then let me know if you got anywhere!

Seems to work on any MATLAB back to R14, when uipanels were introduced. The GUI does not really need its uipanel in any case.
Using event loops makes it possible to query uicontrols instead of having them issue callbacks. I am curious about how far such a model of user interaction might be able to go (i.e., how complicated a GUI can be before it absolutely needs callbacks).

Cite As

Geoff Dutton (2024). GUI to set up and score three sizes of tic-tac-toe (https://www.mathworks.com/matlabcentral/fileexchange/23577-gui-to-set-up-and-score-three-sizes-of-tic-tac-toe), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
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.1

Updated license

1.0.0.0