public class BlockedSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractValidator<G,A,R> implements MapValidator<G,A,R>
MapValidator
to assert that a square that's blocked and no_pass is
not surrounded by blocked and no_pass only.Constructor and Description |
---|
BlockedSquareChecker(ValidatorPreferences validatorPreferences)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> |
findCompletelyBlockedSquares(MapModel<G,A,R> mapModel)
Returns the completely blocked squares of a map.
|
void |
validateMap(MapModel<G,A,R> mapModel,
ErrorCollector<G,A,R> errorCollector)
Validate a map.
|
getKey, isDefaultEnabled, isEnabled, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKey, isDefaultEnabled, isEnabled, setEnabled
public BlockedSquareChecker(@NotNull ValidatorPreferences validatorPreferences)
validatorPreferences
- the validator preferences to usepublic void validateMap(@NotNull MapModel<G,A,R> mapModel, @NotNull ErrorCollector<G,A,R> errorCollector)
validateMap
in interface MapValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
mapModel
- Map to validateerrorCollector
- Error collector to report errors topublic static <G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> java.lang.Iterable<MapSquare<G,A,R>> findCompletelyBlockedSquares(@NotNull MapModel<G,A,R> mapModel)
mapModel
- Map Model to search for completely blocked squares