Past Projects
MAS Major


Homework 9 - Too High, Too Low

Due: See Schedule

In this homework you are asked to create a GUI version of the guessing game "Too High - Too Low" in the spirit of the first game in the CD "The Number Devil". You need to create a working model, with an intuitive user interface.

In the first screen you present the title of your game and your credits; then you wait for a click to start the game. Your program chooses a random number between 0 and 50 and the player has to guess that number in no more than 5 trials per round. Player guesses the number by selecting an option on your interface: She enters a number into a text field, selects a number by clicking on some choices, or does something else that effectively selects a number. You have to decide with your interface which is the better way of selecting a number.

Every time the user selects a number, the program compares it with the chosen random number and reports the outcome by telling "Too high", "Too Low" or "You got it! ". The program keeps track of the history previous guesses to help the user guess better next time. Reporting the history is probably essential to the intuitiveness of your interface. At the same time, there is a lingo-based animation that gives visual feedback of the player's guess. The animation shows a dart hitting the target at the appropriate height of the bull's eye to exemplify the result of the comparison: If it is high, it hits above the bull's eye, if it is low, below it.

An example of a basic game is shown in Miranda's Too High Too Low game. Note that the number-entering interface is not as good as it could be - you should devise a better one! A more intuitive interface is shown in Rebecca's Too High Too Low game. Play with them and think carefully about which features your interface should have.

To help you get started, I have created a simple template that you can start with. Feel free to download it and use it as a starting point, or just examine it and start from scratch - it will give you a glimpse into the basic commands you will need to use. Optimally, you should create something as professionally looking as the game in the first chapter of "The Number Devil". However, feel free to create a different but equivalent game with another metaphore instead of the target-hitting darts.

One way to do this homework is as follows: In a first version of the game, create a program that plays correctly the game for just one round. Then augment it to play through the 5 rounds. In a later version, allow the player to play on three different levels, "easy", "moderate" and "hard", keeping track and displaying the total score for all levels. The difference between these three levels is the number of trials you have (5, 4, 3, respectively).


Your .dir file should be no larger than 2 MB.

As usual, name your game with your puma name_TooHighTooLow.dir and save your game in your folder called ps09.

In addition to how well you executed the assignment, you will be graded on how well you followed the specifications of the assignment, and whether you completed its Assessment questionnaire.

Good luck!



Maintained By: Takis Metaxas
Modified by: Ewelina Oleszek '10
Last Modified: September 5, 2012