Skip to content

doppelganger9/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastermind

Build Status Coverage Status BCH compliance Maintainability Known Vulnerabilities FOSSA Status

This project aims to replicate the classic board game Mastermind 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 Red J=Yellow, Blue, Orange, 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:

  "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.

FOSSA Status

About

Mastermind Classic board game implementation

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages