Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Latest commit

 

History

History
40 lines (29 loc) · 1.21 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.21 KB

CodeBreaker java

This is CodeBreaker written in Java.
What is the origin of CodeBreaker? (Bulls and Cows, Hit and Blow)

How to play

Only execute bat file.

$ run.bat

eyecatch

Document

public CodeBreaker(int maxNumber, int codeLength)

maxNumber

Default: 7

You can specify a maximum value for the code. This must be less than 10.

codeLength

Default: 3

You can specify a length value for the code. This must be less than maxNumber.

Example

// generate a code that max number is 7 and length is 3
CodeBreaker game = new CodeBreaker();

// generate a code that max number is 9 and length is 4
CodeBreaker game = new CodeBreaker(9, 4);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT