feat: added validation to ScenarioConfig
This commit is contained in:
parent
e9987b4d4f
commit
08707e7e73
@ -1,5 +1,7 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.config;
|
package uulm.teamname.marvelous.gamelibrary.config;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@ -8,12 +10,15 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
public class ScenarioConfig {
|
public class ScenarioConfig {
|
||||||
/** An array containing the map based on the {@link FieldType} enum. So, ROCK and GRASS basically. */
|
/** An array containing the map based on the {@link FieldType} enum. So, ROCK and GRASS basically. */
|
||||||
|
@NotEmpty
|
||||||
public FieldType[][] scenario;
|
public FieldType[][] scenario;
|
||||||
|
|
||||||
/** A string containing the name of the author of the scenario config */
|
/** A string containing the name of the author of the scenario config */
|
||||||
|
@NotEmpty
|
||||||
public String author;
|
public String author;
|
||||||
|
|
||||||
/** A string containing the name of the scenario configuration (so basically the map title) */
|
/** A string containing the name of the scenario configuration (so basically the map title) */
|
||||||
|
@NotEmpty
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user