How can I create a grid/array of state buttons similar to those in minesweeper?
3 次查看(过去 30 天)
显示 更早的评论
I want to create a grid of clickable buttons in App Designer. The program should create an N by M matrix of buttons, accordingly to a given variable´s dimensions (a matrix of ones and zeros). Each of these little squares would have a value "underneath" it. Clicking on a square, which holds a zero would paint the square green. Inversely, clicking on a square, which holds value "1" would paint the square red. I have already found some minesweeper-games created in matlab ( by Brian Moore and by Suleman Shafqat ), but I´m not sure, whether I can achieve building a matrix in design view, or should I just write the whole code for creating this grid into the code section? Can anybody help me with this issue?
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!