Bard High School Early College QueensData Structures & Algorithms SK2USpring 2012Instructor: Matthew Carlberg
Review Project #1: Text TwistDue Date:
Wednesday, February 15 at 11:59PM
In this project, you will implement a basic form of the game Text Twist, whichcan be played online at:http://games.yahoo.com/game/text-twist. Our version of the game willwork as follows: The user is ³dealt´ eight random letters, 2 vowels and 6 consonants. The user has 60 seconds to identify as many words as possible that can be created using all or a subset of the eight random letters in their hand. If the user plays a 3 letter word, they get 3 points; if theuser plays a 4 letter word, they get 4 points; and so on.
Starter code is located in Python Resources > Data Structures > TextTwist. Thisfolder also contains words.txt, which is a list of the valid words that a user is allowed to play.This file needs to be in the same folder as your Python file for your code to run correctly.
Working Example of Program:
Loading word list from file...83667 words loaded.You have 60 seconds left.Your current score is 0.Your hand is: i a c f b m b lEnter a word contained in your hand:
ood job!You have 42 seconds left.Your current score is 4.Your hand is: i a c f b m b lEnter a word contained in your hand:
ood job!You have 18 seconds left.Your current score is 8.Your hand is: i a c f b m b lEnter a word contained in your hand:
That word is not in the dictionary.You have 9 seconds left.Your current score is 8.Your hand is: i a c f b m b lEnter a word contained in your hand:
You do not have the proper letters in your hand to play that word.Your time is up.