I made classes for the game. One is for the word list given to players. Other is for setting the game, StartGame. The WordList class includes array of the word to be guessed and hints for the word. StartGame class contains most functions for the game.
I also used keycode of ActionScript and converted it to string to match the word. It helps to match the word with letter which the user typed.
I used Math.random() to set up and display word and hint randomly for the game. It shows
the word and hint from array of WordList randomly.
The most used function is for loop. It is for displaying and checking the letter for the game. It is useful to check the letter which user typed. I used it for DisplayHint, CheckLetters, CheckOutcome, CheckUse, CheckLoss and ShowIncorrect function.
No comments:
Post a Comment