public abstract class AbstractAnalyze<F> extends AnalyzeFactory<F> implements NeighborFind<F>
| Constructor and Description |
|---|
AbstractAnalyze() |
| Modifier and Type | Method and Description |
|---|---|
void |
createRules() |
protected void |
createRules(List<F> points) |
protected abstract boolean |
fieldHasRule(F field)
Determines if the specified field is/has a rule that should be added to the constraints
|
protected abstract List<F> |
getAllPoints() |
protected abstract List<F> |
getAllUnclickedFields() |
protected abstract int |
getFieldValue(F field) |
protected abstract List<F> |
getNeighbors(F field) |
Collection<F> |
getNeighborsFor(F field)
Retrieve the neighbors for a specific field.
|
protected abstract int |
getRemainingMinesCount() |
protected abstract boolean |
isClicked(F neighbor) |
protected abstract boolean |
isDiscoveredMine(F neighbor) |
boolean |
isFoundAndisMine(F field)
Determine if a field is a found mine or not
|
addRule, getGroups, getRules, solve, splitFieldRules, splitFieldRulesprotected abstract boolean fieldHasRule(F field)
field - Field that is being checkedprotected abstract int getRemainingMinesCount()
protected abstract boolean isDiscoveredMine(F neighbor)
protected abstract int getFieldValue(F field)
protected abstract boolean isClicked(F neighbor)
public Collection<F> getNeighborsFor(F field)
NeighborFindgetNeighborsFor in interface NeighborFind<F>field - Field to retrieve the neighbors forCollection of the neighbors that the specified field haspublic boolean isFoundAndisMine(F field)
NeighborFindisFoundAndisMine in interface NeighborFind<F>field - Field to checkpublic void createRules()
Copyright © 2014. All rights reserved.