I created 2 arrays that store letter values for a scrabble game. However my program assigns the wrong point value to 4 of the letters. Why?
My program correctly assigns the indexed point value to all letters except 'D', 'd', 'G', and 'g'. I store these letters in my array LetterValue[2]. They are worth 2 points each but are assigned 3 points. My temporary solution was changing my ScoreValue[7] array to {1,1,3,4,5,8,10}; and then the program assigned my targeted letters 2 points. I figure that the program is either adding one additional point to ScoreValue[2] OR it is not assigning LetterValue[2] to ScoreValue[2] but I can't figure out why. char LetterValue[7][20] = { {'A', 'a', 'E', 'e', 'I', 'i', 'L', 'l', 'N', 'n', 'O', 'o', 'R'
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.