Fun with TX Spell .NET: WordMole - A Simple Game
While I was testing the accuracy and performance of our spell checking product TX Spell .NET, I had an idea for a fun project to test this new component for Visual Studio. WordMole is a word game where the player must build words from randomly created characters. The idea of the game is to build long words - the longer the more points you get. To avoid user frustration, all valid words should be accepted by the game. Including words with prefixes and suffixes. So, not only the word play…


While I was testing the accuracy and performance of our spell checking product TX Spell .NET, I had an idea for a fun project to test this new component for Visual Studio. WordMole is a word game where the player must build words from randomly created characters.
The idea of the game is to build long words - the longer the more points you get. To avoid user frustration, all valid words should be accepted by the game. Including words with prefixes and suffixes. So, not only the word play should be accepted, but also playing and plays.
To check the built words, TX Spell .NET is used as the spelling engine. It is able to check all root words including all possible extensions. For a game, a very fast and accurate spelling engine is required. TX Spell .NET is able to check at least 40.000 words in a second.
The main part of the game is the spell checking of the built word. TX Spell .NET's Check method is called with the specific string. If the IncorrectWords collection is empty, the word is spelled correctly.
txSpellChecker1.Check(lblWord.Content.ToString());
if (txSpellChecker1.IncorrectWords.Count == 0)
{
foreach (ToggleButton btn in tbCheckedButtons)
{
btn.Content = GetLetter();
iPoints++;
}
tbCheckedButtons.Clear();
ClearCharacters();
}
Allow yourself to play a little game to test our new spell checker component for .NET. At least a TX Spell .NET for WPF trial version is required. You can download the full Visual Studio project sources here:
Related Posts
Create a Table of Contents in Windows Forms using C#
This article explains how to create a table of contents in Windows Forms using the ribbon or programmatically. Creating a table of contents is required to organize large documents.
Official TX Text Control .NET Sample Applications Are Now Hosted on GitHub
This article gives a quick overview of the new repositories, their structure and our plans for the future.
ASP.NETJavaScriptDocument Editor
Detect Toggle Button Changes Using a MutationObserver
This article shows how to detect changes of toggle buttons in the ribbon of the web editor using a MutationObserver. The state of a toggle button in the ribbon visualizes the state of a certain…
Two Ways to Restart Numbered Lists in TX Text Control
In TX Text Control, numbered lists are continued by default and need to be reset when required. There is more than one way if you want to restart numbered lists in a document. In this article, two…
Zoom Tricks: Disabling CTRL + MOUSE WHEEL and More
This article shows how to disable CTRL + MOUSE WHEEL, implement zooming with keyboard and reset the zoom factor to its default value.