Iron Coder A CodeNewbie Project

Word Madness Project

Iron Coder #2

This week’s Iron Coder project is the wacky word game that you may be familiar with, Mad Libs. To complete this challenge, prompt the user to input certain types of words and then plug those words into a short story. Hilarity ensues as people add strange words that don’t match the flow of the original story. Have fun making this happen.

Word Madness

The Design

In this challenge, you will have great creative freedom and there are a number of design decisions that you can make and others that your language of choice may nudge you towards.

For instance, when you choose the interface used to collect words from the user, your language may push you towards a specific solution. In Javascript, the answer might be to utilize a form in a web browser. If you are using C or Ruby you might have a command line interface; others may choose a simple GUI application.

There are any number of ways to combine the words that were entered into the final story. Will you chose a template solution where the words are plugged into the appropriate places in a pre-formatted story? Will you create a set of objects to model the components of the story? Will you decide to use some other option? The choice is yours.

Change Happens

Once you have completed the challenge you may opt to modify your program to perform one or more of the stretch goals below. These will add additional complexity to a project and may force you to modify your original design to accommodate them.

I hope that you take the opportunity to implement one of these stretch goals, but even if you decide not to, please take a minute to think about how you might implement them. Often the requirements for a project will change or be extended and you may need to modify your original code to accommodate these changes. I hope that you decide to embrace the change and pick one of the stretch goals below.

Stretch Goals

Here are the stretch goals that you can decide to implement, or not.

  1. Highlight the user’s words in your story in some way, you can use any means you like to set the added words apart from the original story.

  2. Have your solution present more than one story to choose from.

  3. Create a file format to store the story information and then have your solution “play” the story. This will allow your solution to play any number of stories that use the correct file format.

  4. Your solution will not only play the game, it will make the game. Supercharge your solution with the ability to turn any text into a playable mad lib.