class SecretCode
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private Row |
secretCode |
| Constructor and Description |
|---|
SecretCode(int colorQuant,
int width,
boolean doubleColors)
Initializes a new secret code with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
generateCode(int colorQuant,
int width,
boolean doubleColors)
Creates a secret code.
|
Row |
getCode()
Getter for the secret code.
|
boolean |
setCode(Row code)
Setter for the secret code.
|
private Row secretCode
public SecretCode(int colorQuant,
int width,
boolean doubleColors)
colorQuant - Number of different colors.width - Width (number of pins) of the code.doubleColors - Allowance of same colors.private void generateCode(int colorQuant,
int width,
boolean doubleColors)
colorQuant - Number of different colorswidth - Width (number of pins) of the code.doubleColors - Allowance of same colorspublic Row getCode()
public boolean setCode(Row code)
code - The Row to set as secret code.