20 package net.sf.gridarta.model.validation.checks;
31 import org.jetbrains.annotations.NotNull;
37 public class MapDifficultyChecker<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> {
56 super(validatorPreferences);
65 if (difficulty < minDifficulty || difficulty > maxDifficulty) {
Validation error that's used when a map has wrong tile paths.
A MapModel reflects the data of a map.
This is the base class for validators.
This package contains the framework for validating maps.
Interface for Map Validators.
Base package of all Gridarta classes.
MapDifficultyChecker(@NotNull final ValidatorPreferences validatorPreferences, final int minDifficulty, final int maxDifficulty)
Creates a new instance.
Reflects a game object (object on a map).
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
final int maxDifficulty
The maximal acceptable difficulty.
int getDifficulty()
Returns the map's difficulty.
void validateMap(@NotNull final MapModel< G, A, R > mapModel, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a map.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Validator that checks whether the map has a valid difficulty.
An interface for classes that collect errors.
final int minDifficulty
The minimal acceptable difficulty.
Interface for MapArchObjects.