How can I create a grid/array of state buttons similar to those in minesweeper?

3 Ansichten (letzte 30 Tage)
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?

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by