Class AbstractShopSquareChecker<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.validation.AbstractValidator<G,A,R>
-
- net.sf.gridarta.model.validation.checks.AbstractShopSquareChecker<G,A,R>
-
- All Implemented Interfaces:
MapValidator<G,A,R>,Validator<G,A,R>
- Direct Known Subclasses:
PaidItemShopSquareChecker,ShopSquareChecker
public abstract class AbstractShopSquareChecker<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>
AMapValidatorto detect shop squares which allow magic or prayers, or which have adjacent squares that allow magic or prayers.- Fixme:
- this implementation does not take care of multi square objects.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractShopSquareChecker(@NotNull ValidatorPreferences validatorPreferences)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean @NotNull [] @NotNull []findMatchingSquares(@NotNull MapModel<G,A,R> mapModel, @NotNull GameObjectMatcher matcher)Returns abooleanarray of the map size that marks squares that contain game objects matching a givenGameObjectMatcher.-
Methods inherited from class net.sf.gridarta.model.validation.AbstractValidator
getKey, isDefaultEnabled, isEnabled, setEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.gridarta.model.validation.MapValidator
validateMap
-
Methods inherited from interface net.sf.gridarta.model.validation.Validator
getKey, isDefaultEnabled, isEnabled, setEnabled
-
-
-
-
Constructor Detail
-
AbstractShopSquareChecker
protected AbstractShopSquareChecker(@NotNull @NotNull ValidatorPreferences validatorPreferences)Creates a new instance.- Parameters:
validatorPreferences- the validator preferences to use
-
-
Method Detail
-
findMatchingSquares
protected boolean @NotNull [] @NotNull [] findMatchingSquares(@NotNull @NotNull MapModel<G,A,R> mapModel, @NotNull @NotNull GameObjectMatcher matcher)Returns abooleanarray of the map size that marks squares that contain game objects matching a givenGameObjectMatcher.- Parameters:
mapModel- the map to checkmatcher- the matcher to use- Returns:
- the array
-
-