C# - Class Project 02 - 2016-10-13

 

Personal classwork project, finished (zipped) solution shall be sent to akaver@akaver.com at the end of todays lectures - 2016-10-13 16:00

Goal: Number guessing game (console application)

Computer asks you to think of a number in certain range, then guesses it - use binary search.
Computer thinks of a number (random) in certain range, player trys to guess it.
Keep track of statistics - how many games, how many trys to get to correct number etc.
Build up the menu system and all the logic needed. Separate stuff into different projects and classes.

 

Example logic flow for number guessing (not carved into stone, use your own imagination):
Please give your name: Jyri Mari

Please set upper range for guessing: 32

Jyri Mari, please think of some number between 0 and 32 (inclusive). When done, press any key to continue....

I'm thinking that number is 16 (it has to be between 0 and 32)!

Is your number smaller, bigger, or am i correct? (s,b,c): s

I'm thinking, that number is 8 (it has to be between 0 and 15)!

Is your number smaller, bigger, or am i correct? (s,b,c): c

Yay, it took me 2 trys.

--Main menu---
Think a number, computer guesses
Computer thinks a number, I'l guess
Statistics
Exit

--- Statistic menu ---
Average guesses per game
Total guesses