Description:
This repository contains two versions of a classic guessing game implemented in C++ using the Embarcadero compiler:
- Original Version: Your initial implementation of the guessing game, reflecting your unique approach.
- Enhanced Version: A version based on lecture materials, featuring an upgraded UI with number guessing hints (higher or lower).
How to Play:
This game is designed for two players. Here's how it works:
- Player 1: Chooses a secret number to be guessed (within a specified range).
- Player 2: Takes turns guessing the number.
- After each guess, the game provides feedback to Player 2:
- If the guess is higher than the secret number, a message like "Too high!" is displayed.
- If the guess is lower than the secret number, a message like "Too low!" is displayed.
- (For Enhanced Version only) The game also indicates how close Player 2 is getting with a message like "Getting warmer!" or "Getting colder!" (optional).
- Player 2 continues guessing until they correctly identify the secret number.
- The game displays the total number of guesses it took Player 2 to find the number.
Building the Project:
Prerequisites:
- Embarcadero C++ compiler (version details can be specified here)
Steps:
- Clone this repository to your local machine.
- Open the project in your Embarcadero IDE (e.g., C++Builder).
- Configure project settings if necessary (e.g., build options, output directory).
- Build the project.
Running the Game:
- Double-click the executable file generated by the build process.
- The program will prompt Player 1 to enter the secret number.
- The game will then guide Player 2 through the guessing rounds.
Versions:
original
(Your original code)enhanced
(Lecture-based version with improved UI)
Installation
- Clone the Repository:
git clone https://github.com/[your-username]/[your-repository-name].git
- Open the Project:
- Launch Embarcadero C++ Builder.
- Open the
.cbproj
project file.
- Build and Run:
- Build the project to compile the source code.
- Run the executable to start the application.
Original Version Screenshot
1st Guess | 2nd Guess | Founded The Number |
---|---|---|
Enhanced Version Screenshot
1st Guess | 2nd Guess | Founded The Number |
---|---|---|