An interactive command-line game where you guess a secret number!
"Number Guesseur" is a classic, simple yet engaging command-line application developed in C. The objective of the game is for the player to guess a randomly generated secret number within a certain range. After each guess, the game provides feedback, indicating whether the guess was too high or too low, guiding the player towards the correct answer. It's a perfect project for demonstrating basic C programming concepts, including input/output, random number generation, conditional logic, and loops.
- Interactive Gameplay: Engage in a simple number guessing game directly from your terminal.
- Random Secret Number: A new secret number is generated at the start of each game, ensuring replayability.
- Intelligent Feedback: Receive hints (e.g., "Too high!", "Too low!") after each guess to help narrow down the possibilities.
- Guess Counter: Tracks the number of attempts taken to guess the correct number.
Language:
Build Tool:
- A C compiler (e.g., GCC, Clang) installed on your system.
-
Clone the repository
git clone https://github.com/undercraft2206/number-gesseur.git cd number-gesseur -
Navigate to the source directory
cd number_gess -
Compile the source code Assuming the main source file is
number_gess.cinside thenumber_gessdirectory:gcc -o number_gess number_gess.c -std=c99
Note: The
-std=c99flag ensures compatibility with C99 standards, which might be necessary for certain functions likeforloop initializations orlong longtypes if used. -
Run the game
./number_gess
Follow the on-screen prompts to play!
number-gesseur/
βββ number_gess/ # Contains the C source code for the game
β βββ number_gess.c # Expected main source file (TODO: Confirm filename)
βββ README.md # Project documentation
Ensure you have a C compiler installed (e.g., GCC) and follow the compilation steps outlined in the Installation section.
- To the open-source community for providing robust C compilers like GCC.
β Star this repo if you find it helpful or enjoy the game!
Made with β€οΈ by undercraft2206
Readme with https://readmestudio.zenui.net/editor