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

tenzyulab/CodeBreaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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