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?

 Accepted Answer

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

2 Comments

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.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 27 Nov 2015

Commented:

on 29 May 2016

Community Treasure Hunt

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

Start Hunting!