in Software

Word Jumble Game: Part 1

For a recent Regular Expressions Tech Talk at Wharton, I wrote a Word Jumble game.  I will be describing the game and some of the key concepts used in making the game. Here’s the github repo.

Game Screenshot

Game Screenshot

The premise of the game is to transform one word into another by replacing a single letter in the starting word to form a new word and repeating until you match the last word.

So, let’s say we have the word baked, which we want to transform into the word water. We do this by changing one letter in the word baked and forming a new word, repeating the single-letter replacement until we have the word water.

  • baked <- start
  • bated
  • batea
  • bater
  • water <- end

The rules are:

  • You are only given a starting word and ending word
  • Change only one letter to form a new word
  • The new word must be a real word (in some dictionary)
  • The same word cannot appear twice
  • Each word must be the same length

Based on these rules, I sat down one evening and spit out an implementation of the game which has the following features:

  • randomly generates a puzzle of 5-letter words
  • generates a puzzle of max length n, where n is the number of words in the puzzle
  • accepts an initial starting word
  • accepts user guesses for the intermediate words