https://github.com/tolmen/guestsecretcode
A console game in Java where the player has to guess a randomly generated secret combination in the fewest attempts possible.
https://github.com/tolmen/guestsecretcode
game guessing-game java
Last synced: 10 months ago
JSON representation
A console game in Java where the player has to guess a randomly generated secret combination in the fewest attempts possible.
- Host: GitHub
- URL: https://github.com/tolmen/guestsecretcode
- Owner: TolMen
- License: mit
- Created: 2024-11-06T09:48:10.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-12T17:55:41.000Z (11 months ago)
- Last Synced: 2025-02-12T18:42:17.030Z (11 months ago)
- Topics: game, guessing-game, java
- Language: Java
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GuestSecretCode ๐ฎ๐
> **Project created as part of my training for the BTS SIO.**
> --> *Version : [Franรงais](README_fr.md)* ๐
## ๐ Overview
**GuestSecretCode** is a console game in **Java** where the player must guess a randomly generated secret combination.
The objective is to propose combinations and analyze the hints provided on the number of correctly placed digits.
The challenge? Find the correct combination in a **minimum number of attempts**!
## ๐ฒ How to play ?
1. **Start the game** : After running the program, choose the length of the combination to guess.
2. **Make a guess** : Enter a combination of digits.
3. **Hints** : The game tells you how many digits are correctly placed.
4. **Win** : Keep going until you find the secret combination!
## ๐ Installation
### Prerequisites
- **Java JDK 8+** : Make sure you have Java installed on your machine.
- **IDE or Terminal** : You can run the game in an IDE (NetBeans, IntelliJ, Eclipse) or directly via a terminal.
### Installation Steps
1. **Clone the repository**
```sh
git clone https://github.com/TolMen/GuestSecretCode.git
```
OR
```sh
git clone git@github.com:TolMen/GuestSecretCode.git
```
2. **Compile the project**
In a terminal, navigate to the project folder and compile the code :
```sh
javac GuestSecretCode/GuestSecretCode.java
```
3. **Run the game**
Once the compilation is done, start the game with :
```sh
java GuestSecretCode.GuestSecretCode
```
## ๐ก Possible improvements
This project serves as a base for a console game, but it can be enhanced with :
- โ
Displaying the number of misplaced digits.
- โ
Limiting the number of attempts before failure.
- โ
Adding a graphical user interface for a better user experience.
---
Thank you for taking the time to explore this project.
Feel free to explore, learn, and modify it ! โจ
For any questions or collaboration, feel free to reach out ! ๐ฉ
[TolMen](https://github.com/TolMen) - [LinkedIn](https://www.linkedin.com/in/jessyfrachisse/)
๐ Good luck finding the secret combination !