When using gtext command, can I force the text to be placed in a specific area that nearby where a user places it.
Show older comments
I am creating a program for two players to play a game of Tic Tac Toe. I created the board using axis([0 3 0 3]) and xline, yline commands. Then to give the ability to place the X’s and O’s I used gtext command. The problem is that the X’s and O’s can cross over the lines and go out of the box. I’m trying to say when the user clicks anywhere inside the upper left box then the X or O will automatically fix to that box’s center point. Is this possible?
Accepted Answer
More Answers (0)
Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!