Results: 72/100
- Core C#, no libraries.
- Console App (.NET Framework).
- Queues for history.
Done it without using Array.length/Array.Resize, Lists, foreach loops. ONLY arrays, queues, while and for loops and if statements used.
To start it go to Mastermind-Code-Breaker/bin/Release and open the .exe file
.
Or in the command line or powershell type cd the directory you downloaded it to e.g. cd C:/Your User Name/Downloads/Mastermind-Code-Breaker/bin/Release/
then type Mastermind-CodeBreaker.exe
on command prompt or ./Mastermind-CodeBreaker.exe
on Powershell.
- Type a number between 1 and 20 to deecide the amount of guesses you want to have to guess the code, 1 being 1 life and 20 being beginner mode.
- Type a number between 4 and 9 to decide how many colours the computer has to pick from, 4 being easiest to guess, 9 is hardest.
- Type another number between 4 and 9 to determine how long do you want the code to be, 4 digits being easiest as it is the shortest and 9 being longest.
- Enter your guess at each designated position what you think the number is, you have 5-10 guesses.
- It will tell you either:
- Correct number and position (You got it spot on correct).
- Incorrect position but correct number (the number is there but not in the palce you entered it).
- Incorrect number and position (Number is not in code at all).
- If you got them all right then it'll say
You Won!, Do you want to play again?
then you can type yes to continue or no to exit the game. - Else you will keep playing until you got no more guesses left or you guessed the code correctly.