feat: added validation to ScenarioConfig

This commit is contained in:
Yannik Bretschneider 2021-06-05 16:10:05 +02:00
parent e9987b4d4f
commit 08707e7e73

View File

@ -1,5 +1,7 @@
package uulm.teamname.marvelous.gamelibrary.config;
import jakarta.validation.constraints.NotEmpty;
import java.util.Arrays;
import java.util.Objects;
@ -8,12 +10,15 @@ import java.util.Objects;
*/
public class ScenarioConfig {
/** An array containing the map based on the {@link FieldType} enum. So, ROCK and GRASS basically. */
@NotEmpty
public FieldType[][] scenario;
/** A string containing the name of the author of the scenario config */
@NotEmpty
public String author;
/** A string containing the name of the scenario configuration (so basically the map title) */
@NotEmpty
public String name;
@Override