Class BlockedSquareChecker<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

  • All Implemented Interfaces:
    MapValidator<G,​A,​R>, Validator<G,​A,​R>

    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>
    A MapValidator to assert that a square that's blocked and no_pass is not surrounded by blocked and no_pass only.
    Fixme:
    this implementation does not take care of multi square objects.
    • Constructor Detail

      • BlockedSquareChecker

        public BlockedSquareChecker​(@NotNull
                                    @NotNull ValidatorPreferences validatorPreferences)
        Creates a new instance.
        Parameters:
        validatorPreferences - the validator preferences to use
    • Method Detail

      • findCompletelyBlockedSquares

        public 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
                                                                                                                                                                                                                            @NotNull MapModel<G,​A,​R> mapModel)
        Returns the completely blocked squares of a map.
        Parameters:
        mapModel - Map Model to search for completely blocked squares
        Returns:
        list with all completely blocked squares