public class RandomGuesses extends java.lang.Object implements SolvingAlgorithm
| Modifier and Type | Field and Description |
|---|---|
(package private) Color[] |
allCols
All colors available in the game.
|
(package private) Color[] |
allowedCols
The colors that are "allowed" in the game.
|
private ControlInterface |
ci
The ControlInterface to work with.
|
private int |
colQuant
Range of colors to choose from.
|
private boolean |
doubleColors
Allowance of same colors.
|
private int |
width
Width of the row.
|
| Constructor and Description |
|---|
RandomGuesses(ControlInterface ci)
Initialize the AI with settings from the Mastermind engine.
|
| Modifier and Type | Method and Description |
|---|---|
Row |
generateGuess()
Generating a totaly random guess ignoring previous results.
|
int |
makeGuess()
Do a full guess on the Mastermind engine.
|
private ControlInterface ci
private int width
private int colQuant
private boolean doubleColors
Color[] allowedCols
Color[] allCols
public RandomGuesses(ControlInterface ci)
ci - A control interface the AI will use to
interact with a game.public int makeGuess()
makeGuess in interface SolvingAlgorithmControlInterface.turn()public Row generateGuess()
generateGuess in interface SolvingAlgorithm