I'm currently working on scrabble and I'm unsure how to go about making 'word' in line with POINTS[], so they match and have the same values for letters. This is the code I have so far, only recently figured that to index into word, I use word[i] as it will vary how long this array is, dependent on what the user types in. Thank you!
int compute_score(string word) { // TODO: Compute and return score for string for(int i=0; i <strlen(word), i++)// loop through string {
if(islower(word[i])==true)// *checks if ascii is between 97-122*
{
POINTS[0]*//index into points, use characters in word*
*// subtract difference in line with points*
} *//return int*
if(isupper(word[i])==true)*// checks if ascii is between 65-90*
{
POINTS[0]
}
else
{
*//score as 0*
}
}
}