 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.validation.checks;
32 import org.jetbrains.annotations.NotNull;
38 public class MapEnterLocationChecker<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> {
52 final int enterX = mapArchObject.
getEnterX();
53 final int enterY = mapArchObject.
getEnterY();
55 if (enterX < 0 || enterY < 0 || enterX >= mapSize.
getWidth() || enterY >= mapSize.
getHeight()) {
Validation error that's used when a map's default enter coordinate is invalid.
int getWidth()
Returns the width of the area.
Validator that checks whether the map has a valid difficulty.
A MapModel reflects the data of a map.
int getEnterX()
Returns the enter x coordinate.
Base package of all Gridarta classes.
MapEnterLocationChecker(@NotNull final ValidatorPreferences validatorPreferences)
Creates a new instance.
void validateMap(@NotNull final MapModel< G, A, R > mapModel, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a map.
Reflects a game object (object on a map).
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Interface for Map Validators.
Configuration parameters for Validators.
Size2D getMapSize()
Returns the map size.
GameObjects are the objects based on Archetypes found on maps.
int getHeight()
Returns the height of the area.
Interface for MapArchObjects.
An interface for classes that collect errors.
This is the base class for validators.
This package contains the framework for validating maps.
int getEnterY()
Returns the enter y coordinate.
The class Size2D represents a 2d rectangular area.