Skip to content

thovin/Codebreaker-C-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Codebreaker (C++)

This is a C++ program that runs a game for the user. In this game the user must guess a code generated by the computer. The user will have X chances to guess the code, with the value of X being chosen at the beginning of the game. For every guess they will be told how many digits are correct but misplaced and how many digits are completely correct. The program runs as follows:

Step 1: Print out the game’s instructions

Step 2: Get the length of the code, range of numbers, and number of guesses

Step 3: Generate the code to the user’s specifications using a random number generator

Step 4: Print the scoreboard and begin the core gameplay loop

Step 5: Get the user’s guess, ensure that it is within the specified range, and score it. Repeat until the user guesses the code or runs out of guesses.

Step 6: Print the winning or losing message and ask the user if they wish to play again. If yes, go to step 2. If not, exit the program.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published