project 3 - Project 3: A Smart Game Due date: October, 15...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Project 3: A Smart Game Due date: October, 15 2010 Design and implement an application that plays a game that will allow a person to increase her/his skills in guessing the next term in a sequence of numbers, a typical question in an IQ test. Before the game begins, the application will allow the user to select the level of difficulty, (Beginner, Intermediate, Advance). The level (s)he selects must control the difficulty of the sequence as well as the number of attempts the user is allowed per game. The application generates a sequence of integers t1, t 2 , t 3 , t 4 , t 5 ,....... , using the following formula: t i = a*i b + c where t i represents the i th term of the sequence. The coefficients a, b and c are integers. The number of attempts, the difficulty of the sequence and the number of initial terms displayed to the user according to the level of difficulty is as follows: Coefficients Level Level Numbe r Number of Initial Terms Number of Attempts a b c Beginner 1 8 15 Random number between 1 and 4 1 Random number between 1 and 20 Intermediate 2 5 10 Random number between 4 and 8 2 Random number between 1 and 50 Advance 3 3 5 Random number between 8 and 12 3 Random number between 1 and 100 At the beginning of the program, the program asks the user which the level of difficulty (s)he wants to play the game. If the user inputs an incorrect value, the program should keep asking the user for values until the user inputs a valid value for the level of difficulty. Afterwards, the program shows the first terms of the sequence according to the level of difficulty and asks the user to enter the next term of that sequence. If the user does not enter the correct answer, the application displays a message indicating that the user's answer is wrong and prompts the user for another answer. The application continues asking until either the user enters the correct answer or the number of permitted attempts is exceeded. At the end of each run of the game, the application will show the formula that generates the sequence and the next term of the sequence if the user has not entered the correct answer. Afterwards, the program prompts the user whether (s)he wants to play another run of the game or to stop. If the user enters n or N, the game terminates. On the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
other hand, if the user wants to continue playing and has guessed correctly the next term in the previous run of game, the program will prompt the user if (s)he wants to be play at the next game level, unless (s)he already is playing at the advance level. If the user
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/15/2010 for the course CSCI 01209 taught by Professor Storm during the Fall '10 term at University of Georgia Athens.

Page1 / 6

project 3 - Project 3: A Smart Game Due date: October, 15...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online