+ 2

How to make your computer input a word when given any letter of a word .

I'm trying to make a scrabble game where the player 2 is the computer it self .. I added a short word list in the form on multi-dimension arrays. but how can I make the computer access that and input a word .

9th Jun 2018, 10:12 PM
Safwat Adiba
Safwat Adiba - avatar
11 Réponses
+ 2
But if it's a multidimensional array, it would look something more like this: std::string word = wordArray[x][y];
11th Jun 2018, 8:57 PM
Zeke Williams
Zeke Williams - avatar
+ 2
Zeke Williams the player will be given a random set of letters .. and he(the computer) would have to find a word
29th Jun 2018, 9:52 PM
Safwat Adiba
Safwat Adiba - avatar
+ 2
Ben Allen (Njinx) it's completely random .
29th Jun 2018, 10:23 PM
Safwat Adiba
Safwat Adiba - avatar
2nd Jul 2018, 2:33 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 2
https://code.sololearn.com/c3hx3jdMHxEn/?ref=app
2nd Jul 2018, 5:28 AM
Safwat Adiba
Safwat Adiba - avatar
+ 1
Fun project! The first project I made was a Scrabble scoring program, and I learned a lot from it. So what exactly do you want the computer to do, Safwat Adiba ? Do you want the computer to pick a word from the word list at random?
9th Jun 2018, 11:34 PM
Zeke Williams
Zeke Williams - avatar
+ 1
std::string word = wordArray[x]; where x is the array key.
11th Jun 2018, 4:09 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
Safwat Adiba Are the letter sets predegined and the player just gets a random set, or are the actual letters completely random?
29th Jun 2018, 10:13 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
Zeke Williams working on it Ben Allen (Njinx) thnx 😊
30th Jun 2018, 3:55 AM
Safwat Adiba
Safwat Adiba - avatar
0
Safwat Adiba can you post some code? I would be able to better understand what you are trying to do by looking at it :)
29th Jun 2018, 9:56 PM
Zeke Williams
Zeke Williams - avatar
0
Safwat Adiba I'll try and write some code tonight for you.
30th Jun 2018, 12:09 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar