https://github.com/doppelganger9/mastermind
Mastermind Classic board game implementation
https://github.com/doppelganger9/mastermind
game java kata lombok mastermind
Last synced: 8 months ago
JSON representation
Mastermind Classic board game implementation
- Host: GitHub
- URL: https://github.com/doppelganger9/mastermind
- Owner: doppelganger9
- License: mit
- Created: 2018-02-18T15:25:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T19:32:22.000Z (about 2 years ago)
- Last Synced: 2024-04-12T00:20:54.005Z (about 2 years ago)
- Topics: game, java, kata, lombok, mastermind
- Language: Java
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mastermind
[](https://github.com/doppelganger9/mastermind/actions) [](https://coveralls.io/github/doppelganger9/mastermind?branch=master) [](https://bettercodehub.com/) [](https://codeclimate.com/github/doppelganger9/mastermind/maintainability) [](https://snyk.io/test/github/doppelganger9/mastermind?targetFile=pom.xml) [](https://app.fossa.io/projects/git%2Bgithub.com%2Fdoppelganger9%2Fmastermind?ref=badge_shield)
This project aims to replicate the classic board game [Mastermind](https://en.wikipedia.org/wiki/Mastermind_(board_game))
Sample code provided in Java language.
You are the player.
## How to use
- Prerequisite: Java 21 (or else use old version 1.0)
- `mvn package && java --enable-preview -jar target/mastermind-1.1-SNAPSHOT.jar`
- give answers through STDIN + ENTER key to validate.
Use **R**ed **J**=Yellow, **B**lue, **O**range, **V**=Green, **N**=Black.
- win 😎 !
## Bonus: Running & Debugging on VSCode
I used this project as a Test Drive for Java support on **Visual Studo Code**.
I used these extensions:
- Language Support for Java by RedHat,
- Debugger for Java,
- Java Test Runner,
For Lombok support, I had to tweak my config:
```json
"java.jdt.ls.vmargs":
"-javaagent:/path/to/.m2/repository/org/projectlombok/lombok/1.16.18/lombok-1.16.18.jar -Xbootclasspath/a:/path/to/.m2/repository/org/projectlombok/lombok/1.16.18/lombok-1.16.18.jar",
```
After that VSCode was able to correctly pick up `@Getter`, `@Setter`, etc.
Then, to debug:
- `mvn -Dmaven.surefire.debug test`
- Then use the `Debug (Attach)` launch configuration in Visual Studio Code to debug step by step.
Or use the integrated terminal window and run maven commands.
## Future
In the future I will add auto-play to try the **Five-guess algorithm** and the **Genetic Algorithm**
## License
MIT see [LICENSE](LICENSE).
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fdoppelganger9%2Fmastermind?ref=badge_large)