Skip to content

Instantly share code, notes, and snippets.

@chubas
Last active February 27, 2019 19:06
Show Gist options
  • Save chubas/bd5211ad94ae85cdf1c4 to your computer and use it in GitHub Desktop.
Save chubas/bd5211ad94ae85cdf1c4 to your computer and use it in GitHub Desktop.
Word Blender

GDLJS Monthly Challenge #1 - Word Blender

This is an adaptation for the RubyQuiz #108 Word Blender, lots of spoilers there so best to look after!

Word Blender

The task for this month is to build a game based on the popular game TextTwist (and many other variations there are). It can be built as sophisticaded as you want, ranging from a command line game to a full featured GUI game if you want.

Rules

The core rules of the game:

  • When the player starts a round, he is presented six letters, which must form at least one word using all of them. The letters are in a scrambled order.
  • The player then has the opportunity to input words using a combination of the letters he was given. The words should be at least 3 letters size.
  • If the inputted word is a valid dictionary word, the user earns points corresponding to the length of the word
  • If the user inputs a valid word with all 6 letters, the player wins the round
  • It is up to the solver to decide how the sequence of rounds will be (e.g. single-round game, automatic level change when the full word is discovered, add a timer and advance round when the round expires)
  • Words should be taken only by their alphabetic value, this means that capitalization, apostrophes, accents, etc. should not count towards the word, need to remove duplicates

Variable rules (you can add them or change it for the full game experience)

  • Add a timer per round, and game over if time expires before finding the full letter word
  • Use penalties each time the user inputs an invalid word
  • Change the number of letters to introduce a difficulty setting
  • Precalculate all the possible words that can be formed with those letters before the round starts, and give points for full completion
  • Use a continuous timer (not per round) and automatically change round whenever the full word is discovered. Add a small time bonus increment each time a correct word is entered
  • Give the user the ability to shuffle the presented letters

Hints

On Unix* machines, you can get a word dictionary at /usr/share/dict/words Other lists: https://raw.githubusercontent.com/dwyl/english-words/master/words.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment