refactor: moved config and messages out of JSON

This commit is contained in:
2021-06-02 16:28:19 +02:00
parent b13a7db67b
commit ea3d51c408
22 changed files with 62 additions and 53 deletions

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.config;
package uulm.teamname.marvelous.gamelibrary.config;
import com.fasterxml.jackson.annotation.JsonIgnore;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.config;
package uulm.teamname.marvelous.gamelibrary.config;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.config;
package uulm.teamname.marvelous.gamelibrary.config;
/**
* Enum defining the different field types as described by standard document

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.config;
package uulm.teamname.marvelous.gamelibrary.config;
/**
* POJO describing the PartyConfig as defined by the standard document

View File

@ -1,6 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.config;
import uulm.teamname.marvelous.gamelibrary.json.config.FieldType;
package uulm.teamname.marvelous.gamelibrary.config;
/**
* POJO describing the ScenarioConfig as defined by the standard document

View File

@ -4,9 +4,9 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2;
import uulm.teamname.marvelous.gamelibrary.entities.Entity;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.events.EventType;
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig;
import uulm.teamname.marvelous.gamelibrary.requests.Request;
import java.util.ArrayList;

View File

@ -5,7 +5,7 @@ import uulm.teamname.marvelous.gamelibrary.entities.Character;
import uulm.teamname.marvelous.gamelibrary.entities.*;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.events.*;
import uulm.teamname.marvelous.gamelibrary.json.config.FieldType;
import uulm.teamname.marvelous.gamelibrary.config.FieldType;
import uulm.teamname.marvelous.gamelibrary.requests.CharacterRequest;
import uulm.teamname.marvelous.gamelibrary.requests.Request;
import uulm.teamname.marvelous.gamelibrary.requests.RequestType;

View File

@ -4,9 +4,9 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2;
import uulm.teamname.marvelous.gamelibrary.entities.Entity;
import uulm.teamname.marvelous.gamelibrary.entities.EntityID;
import uulm.teamname.marvelous.gamelibrary.entities.StoneType;
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -1,7 +1,7 @@
package uulm.teamname.marvelous.gamelibrary.gamelogic;
import uulm.teamname.marvelous.gamelibrary.entities.StoneType;
import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
import java.util.HashMap;

View File

@ -4,9 +4,9 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.InjectableValues;
import com.fasterxml.jackson.databind.ObjectMapper;
import jdk.jshell.spi.ExecutionControl;
import uulm.teamname.marvelous.gamelibrary.json.basic.BasicMessage;
import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage;
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.messages.BasicMessage;
import uulm.teamname.marvelous.gamelibrary.messages.EventMessage;
import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
/**
* Class that contains JSON encoding and decoding. It is initiated with the Character configuration.

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.basic;
package uulm.teamname.marvelous.gamelibrary.messages;
import uulm.teamname.marvelous.gamelibrary.json.MessageType;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.basic;
package uulm.teamname.marvelous.gamelibrary.messages;
import uulm.teamname.marvelous.gamelibrary.json.MessageType;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.basic;
package uulm.teamname.marvelous.gamelibrary.messages;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.json.MessageType;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.basic;
package uulm.teamname.marvelous.gamelibrary.messages;
import uulm.teamname.marvelous.gamelibrary.events.Event;
import uulm.teamname.marvelous.gamelibrary.json.MessageType;

View File

@ -1,4 +1,4 @@
package uulm.teamname.marvelous.gamelibrary.json.basic;
package uulm.teamname.marvelous.gamelibrary.messages;
/** Enum containing the basic roles as defined by the network standard */
public enum RoleEnum {

View File

@ -3,7 +3,7 @@ package uulm.teamname.marvelous.gamelibrary.requests;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage;
import uulm.teamname.marvelous.gamelibrary.messages.EventMessage;
import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.RequestDeserializer;
import uulm.teamname.marvelous.gamelibrary.json.ingame.serialize.RequestSerializer;