diff --git a/.gradle/7.0/executionHistory/executionHistory.bin b/.gradle/7.0/executionHistory/executionHistory.bin index eb02099..d99eea5 100644 Binary files a/.gradle/7.0/executionHistory/executionHistory.bin and b/.gradle/7.0/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.0/executionHistory/executionHistory.lock b/.gradle/7.0/executionHistory/executionHistory.lock index a5dfef8..3d0543e 100644 Binary files a/.gradle/7.0/executionHistory/executionHistory.lock and b/.gradle/7.0/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.0/fileHashes/fileHashes.bin b/.gradle/7.0/fileHashes/fileHashes.bin index 9a49c76..aea671b 100644 Binary files a/.gradle/7.0/fileHashes/fileHashes.bin and b/.gradle/7.0/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.0/fileHashes/fileHashes.lock b/.gradle/7.0/fileHashes/fileHashes.lock index 79bc694..53516a0 100644 Binary files a/.gradle/7.0/fileHashes/fileHashes.lock and b/.gradle/7.0/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index b7f4bf1..686dd9d 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 06caadf..915eed4 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.idea/.gitignore b/.idea/.gitignore index e5968a1..3da48de 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -6,6 +6,8 @@ /build/ !gradle-wrapper.jar +*.iws + # Cache of project .gradletasknamecache diff --git a/.idea/misc.xml b/.idea/misc.xml index 84c523c..9a2ce5e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java index a493812..a5dc0dd 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java @@ -1,6 +1,6 @@ package uulm.teamname.marvelous.gamelibrary.events; -import uulm.teamname.marvelous.gamelibrary.json.MessageStructure; +import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure; /** Represents an abstract event sent inside a {@link MessageStructure} between client and server. */ diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/CharacterConfiguration.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/CharacterConfiguration.java deleted file mode 100644 index 501d86e..0000000 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/CharacterConfiguration.java +++ /dev/null @@ -1,4 +0,0 @@ -package uulm.teamname.marvelous.gamelibrary.json; - -public class CharacterConfiguration { -} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/JSON.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/JSON.java index 3103439..9e165d3 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/JSON.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/JSON.java @@ -1,6 +1,7 @@ package uulm.teamname.marvelous.gamelibrary.json; import jdk.jshell.spi.ExecutionControl; +import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure; /** Contains JSON encoding and decoding. */ diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageType.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageType.java new file mode 100644 index 0000000..cbadd4d --- /dev/null +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageType.java @@ -0,0 +1,20 @@ +package uulm.teamname.marvelous.gamelibrary.json; + +/** + * Enum describing all possible MessageTypes as defined by Standard document + */ +public enum MessageType { + HELLO_CLIENT, + HELLO_SERVER, + RECONNECT, + PLAYER_READY, + GAME_ASSIGNMENT, + GENERAL_ASSIGNMENT, + CHARACTER_SELECTION, + CONFIRM_SELECTION, + GAME_STRUCTURE, + REQUESTS, + EVENTS, + GOODBYE_CLIENT, + ERROR +} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/FieldType.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/FieldType.java new file mode 100644 index 0000000..dd801cd --- /dev/null +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/FieldType.java @@ -0,0 +1,9 @@ +package uulm.teamname.marvelous.gamelibrary.json.config; + +/** + * Enum defining the different field types as described by standard document + */ +public enum FieldType { + GRASS, + ROCK, +} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/PartyConfiguration.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/PartyConfiguration.java new file mode 100644 index 0000000..e0ebdac --- /dev/null +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/PartyConfiguration.java @@ -0,0 +1,42 @@ +package uulm.teamname.marvelous.gamelibrary.json.config; + +/** + * POJO describing the PartyConfiguration as defined by the standard document + */ +public class PartyConfiguration { + /** Max round amount in a match */ + public int maxRounds; + + /** Max round time in a match in seconds */ + public int maxRoundTime; + + /** Max overall time in a match in seconds */ + public int maxGameTime; + + /** Max time a single animation might take up in seconds */ + public int maxAnimationTime; + + /** Cooldown of the space stone in rounds */ + public int spaceStoneCD; + + /** Cooldown of the mind stone in rounds */ + public int mindStoneCD; + + /** Cooldown of the reality stone in rounds */ + public int realityStoneCD; + + /** Cooldown of the power stone in rounds */ + public int powerStoneCD; + + /** Cooldown of the time stone in rounds */ + public int timeStoneCD; + + /** Cooldown of the soul stone in rounds */ + public int soulStoneCD; + + /** Damage the mind stone does when used */ + public int mindStoneDMG; + + /** Max pause time. Optional */ + public int maxPauseTime; +} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/ScenarioConfig.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/ScenarioConfig.java new file mode 100644 index 0000000..66330fe --- /dev/null +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/config/ScenarioConfig.java @@ -0,0 +1,14 @@ +package uulm.teamname.marvelous.gamelibrary.json.config; + +import uulm.teamname.marvelous.gamelibrary.json.config.FieldType; + +/** + * POJO describing the ScenarioConfig as defined by the standard document + */ +public class ScenarioConfig { + + /** An array containing the map based on the {@link FieldType} enum. So, ROCK and GRASS basically. */ + public FieldType[][] scenario; + public String author; + public String name; +} diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageStructure.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/MessageStructure.java similarity index 92% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageStructure.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/MessageStructure.java index 1438edd..978f992 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/MessageStructure.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/MessageStructure.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json; +package uulm.teamname.marvelous.gamelibrary.json.ingame; import uulm.teamname.marvelous.gamelibrary.events.Event; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java index 24bea5c..319e722 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java @@ -1,6 +1,6 @@ package uulm.teamname.marvelous.gamelibrary.requests; -import uulm.teamname.marvelous.gamelibrary.json.MessageStructure; +import uulm.teamname.marvelous.gamelibrary.json.ingame.MessageStructure; /** Represents an abstract request sent inside a {@link MessageStructure} between client and server. */ diff --git a/team25.iml b/team25.iml new file mode 100644 index 0000000..43956c1 --- /dev/null +++ b/team25.iml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/team25.ipr b/team25.ipr new file mode 100644 index 0000000..bab52ea --- /dev/null +++ b/team25.ipr @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6 + + + + + + + + + + + + +