Sunday, April 19, 2009

Cheating at Bookworm Adventures

Bookworm Adventures is a word game where you have to make words out of a grid containing 16 random  letters. The longer the word, the bigger the damage you do to the current baddie. In essence, it's an anagram game - you need to jumble the letters up to make a legal word. I thought it would be fun as a first C++ project to create a program that outputs the longest legal word using the grid letters as input. Of course, me and my 7-year old son would only use this as a last resort (maybe).
This sort of thing can be done in 20 lines of Ruby. And probably any other scripting language. I guarantee my C++ version will be much longer! Still, it's a useful exercise because it will involve I/O streams and STL containers and algorithms. It's also small enough to be done in an evening (hopefully)!

No comments:

Post a Comment