20 package net.sf.gridarta.model.validation.checks;
22 import java.awt.Point;
32 import org.jetbrains.annotations.NotNull;
40 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> {
58 final Size2D mapSize = mapModel.getMapArchObject().getMapSize();
59 final int mapWidth = mapSize.
getWidth();
60 final int mapHeight = mapSize.
getHeight();
61 final boolean[][] matchingSquares =
new boolean[mapWidth][mapHeight];
62 final Point point =
new Point();
63 for (point.x = 0; point.x < mapWidth; point.x++) {
64 for (point.y = 0; point.y < mapHeight; point.y++) {
65 matchingSquares[point.x][point.y] =
isMatching(mapModel.getMapSquare(point), matcher);
68 return matchingSquares;
80 if (matcher.isMatching(gameObject.getHead())) {