public class CoverPercentageConstraint extends AbstractConstraint
| Modifier and Type | Field and Description |
|---|---|
double |
coverPercentage
the current cover percentage
|
double |
maxCoverPercentage
the max acceptable cover percentage
|
double |
minCoverPercentage
the min acceptable cover percentage
|
| Constructor and Description |
|---|
CoverPercentageConstraint() |
| Modifier and Type | Method and Description |
|---|---|
double |
checkConstraint()
Check if the percentage of objects in the play field is between minCoverPercentage
and maxCoverPercentage
|
setParameterspublic double coverPercentage
public double minCoverPercentage
public double maxCoverPercentage
public double checkConstraint()
checkConstraint in class AbstractConstraint