I'm working on Scrabble for my CS project. I need help implementing the letters in my board via ginput. Can someone tell me how to input the alphabet in a vector and then define a condition that will generate 7 random letters for the player?

 Akzeptierte Antwort

letters=['A':'Z'];
ind = randperm(numel(letters), 7);
draw7 = letters(ind)

2 Kommentare

Thank you! Can you also tell me how to use ginput in such a way that when I select one of the letters displayed on the side of my board, it will display on the board at the exact point where I click on the board? Basically, I need help with the two mouse inputs. The selecting-the-letter input and the displaying-on-board input.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Exploration finden Sie in Hilfe-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