Sunday, June 15, 2014

Scramble Mambo

CS50 Week 3 problem set requires that one complete the code on a largely done
Scramble game. One of the TODOs is the lookup function, where the dictionary
is checked to see if it contains the player's word, thus enabling score points.

I have found, on the net, various implementations  of this function that are
incomplete. In effect, the function as defined below never returns true, and blocks
points.

The remedy I am proposing uses the string compare fuction. In effect, there are two iterations
going on here: one through the words in the dictionary, and another within words, through
each character. The computer won't iterate if one doesn't tell it to!!




 
HAPPY FATHER'S DAY!

No comments: