10-07-2012, 07:14 PM
anyone cn help me with class diagram for crossword puzzle?
i have done the algorithm for the main function however i'm stuck when need to compare the words keyed in by the user with the one in the dictionary
Algorithm:
1. Start
2. Set word, choice, boxNumber, option, size=0, puzzleSolve=false, completePuzzle=false, countPuzzle=0
3. Display menu
4. Ask user to input option
5. Get option from user.
6. If option =
Case ‘1’: Display the rules of the game
i. Return to menu
Case ‘2’: Play the game
i. Ask user to input boxNumber
ii. Get boxNumber from user
iii. Ask user to input alphabet
iv. Get alphabet from user
v. For i=0 to size
• Match every keyed in alphabet with alphabet in dictionary
• If all alphabet match
puzzleSolve=true
else
goto step i
vi. count=count+1
vii. if count = 10
• completePuzzle=true
• Display message
viii. Display message to ask player to play another game
ix. Ask user for input choice
x. Get input choice from user
Case ‘3’: Quit
7. End
[/size]
[size=small]