So, the program takes the scrambled word, and searches all of the word lists as soon as the scrambled word is available. It would be impractical to search all 120,000+ words to see if one of them was a valid one. Part of the game play support, the program has to be able to quickly identify words that are indeed found within the scrambled word. ![]() While the dictionary object makes it easy to manage all of the word lists in a single location, the real use of the dictionary is to allow the program to discover and track words that are contained WITHIN the scrambled word. This reduces the change that a recently used word will be presented again too soon after its last use. When all of the words in a group have been seen, only a percentage of the words are marked as not having been used. Other dictionary functionality includes the ability to mark a word as having been used (so that the user won't see the same scrambled word until all of the other words in that letter group have been seen). However, there was a use for at least one of these unused list indexes. To make accessing the word lists a little easier to maintain, the dictionary creates 11 word lists, with list index 0 through 2 not being used to store dictionary words. As most of us already know, C# lists are zero-based. ![]() Remember, we had words with from three to ten letters. I created a " dictionary" class which created a word list object for each set of words based on their character counts. Now that I had a sufficient list of words from which to bamboozle the user, I needed a way to load them all into memory at the same time. What better source of words than the most famous and popular word game in the world? In no time, I'd gathered a collection of over 125,000 words. So, I figured I need to find lists of words that were legal in the game Scrabble. I also wanted to make sure I included as many valid words as possible. So, I searched the web for lists of words of various lengths, from three to ten characters long. What I DidĪfter becoming sufficiently annoyed with the game, I decided it wouldn't be too awful hard to duplicate the game, but I wanted to include a much more far-reaching dictionary. There is no fancy interface, no amazing 3-D effects, and no attempts to dazzle anyone. NET (I've only been coding in C# since August of 2007). I simply wrote the game to help me learn. ![]() NET Framework's more esoteric functionality. Note: This is not a complex game, and the code certainly doesn't explore or exercise any of the. Mind you, I'm not talking about obscure and rarely used words, but plain English stuff that any person with even just a mediocre vocabulary would see. Second, the number of words are radically fewer than what actually exist in the scrambled word. First, your scrambled word is never comprised of more than six letters, making for a limited dictionary. While somewhat amusing (based solely on what the off-screen cannibals might be saying), the game is severely limited in its scope, and in my humble opinion, arbitrarily so. All the while, a pair of off-screen cannibals try to distract you with witty remarks, questions about your computer system, word suggestions (that are never right for the scramble you're currently working with), and sometimes, outright taunting. The game presents you with a scrambled 6-letter word, and presents you with an opportunity to find 10-20 words that exist within the original word in a short amount of time. Make sure you check out the new WPF version here: Anagrams2 - A Simple WPF Game ApplicationĪ few years ago, my wife started playing the Anagrams game from the Hoyle Word Games CD.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |