Over Under Seven Game Code

Game Code: OverUnderSeven

Project Schedule:

Week 1 –

Discussed whether or not we wanted to make a second game

Discussed options for second game.

Interviews 

Weeks 2 – 

Decided to do sevens

Coded the game

Week 3 – 

Finished notebook

Meeting Notes:

Do we need a second game for extra credit? Yes. Okay how about guess over under 7? Sounds good. Cool. Let’s do that. Alright it is done.

Interviews:

Do you get bored waiting for class to start 

Yes

Yes

Would you like a simple game to play to keep your attention while waiting for a class

Sometimes

Yes if I don’t have people to talk to

Do you like guessing games 

If I’m in the mood

Kinda

Advertisement:

Software Documentation

Introduction:

This documentation covers the game over under seven. There is a user manual, program description for the developers, a flowchart that goes over the code, as well as the code itself, our team’s discussion, as well as conclusions and recommendations.

User Manual:

The game starts. Then the computer generates a number over or under seven between 0 and 15. The user inputs the guess 0, for under 7 and 1 for a guess of over 7. The computer then checks the guess against the random number. If the guess is correct then the computer says that you win. If the guess is wrong it says you lose.

Program Description for Developers:

A random number between 1 and 15 is generated, if this number is equal to 7 the generation is repeated so that when the program continues the number is not equal to 7. This number is assigned to the variable rand_num.

The rules of the game are described to the user, who is prompted to enter either 0 or 1 to indicate whether they believe the random number is over or under 7, respectively. This input is in string form to avoid an error in the event that the user enters a non-numeric value. The input is stored in variable player_choice.

Nested for loops are used to determine whether the user’s selection was correct.

Flow Chart:

Conclusions and Recommendations:

The developers feel as if this was almost too easy. They would have liked to have added depth to the game by recording wins and losses and possibly adding a percentage that would display the percentage of correct guesses. The researchers recommend that the added depth and inclusion of a record in future developement would make the game more competitive and fun.

Leave a Reply

Your email address will not be published. Required fields are marked *