 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.validation.checks;
36 import org.jetbrains.annotations.NotNull;
42 public class TilePathsChecker<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> {
63 for (
int direction = 0; direction <
tilePaths; direction++) {
64 final String path = mapArchObject.
getTilePath(directions[direction]);
65 if (!path.isEmpty()) {
68 if (!file.exists() || file.isDirectory()) {
69 errorCollector.collect(
new TilePathsError<>(mapModel, directions[direction], path));
A MapModel reflects the data of a map.
Exception thrown if the destination path points to the source map.
Validator that checks whether all tile paths are valid.
Base package of all Gridarta classes.
String getTilePath(@NotNull Direction direction)
Returns a tile path.
final int tilePaths
The number of tile paths to check.
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
Reflects a game object (object on a map).
Utility class for MapPath related functions.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
void validateMap(@NotNull final MapModel< G, A, R > mapModel, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a map.
Interface for Map Validators.
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
An interface for classes that collect errors.
This is the base class for validators.
Exception thrown if an operation is attempted on an unsaved map.
This package contains the framework for validating maps.
Validation error that's used when a map has wrong tile paths.
TilePathsChecker(@NotNull final ValidatorPreferences validatorPreferences, final int tilePaths)
Creates a new instance.