homework

Home
Syllabus
Schedule
Tutorials
Homework
Past Projects
MAS Major
Resources

Homework

Homework 8A - 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 only create a basic working model, but feel free to embellish it if you want.

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 selects a random number between 0 and 50 and the player has to guess it in no more than 5 trials per round. Player guesses are entered into a text field. Every time the user enters a number, the program compares it with the chosen 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. At the same time, there is a small animation that gives some 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.

An example of a similar game is shown in Miranda's game. Note that the number-entering interface is not as good as it could be - you should devise a better one!

To help you get started, I have created a simple template that you can use. Feel free to download it and use it as a starting point, or just examine it - 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).

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

Good luck!


 

 

Maintained By: Takis Metaxas
Modified by: Ewelina Oleszek '10
Last Modified: March 16, 2008