44 lines
1.6 KiB
Java
44 lines
1.6 KiB
Java
|
package uulm.teamname.marvelous.gamelibrary.messages;
|
||
|
|
||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||
|
import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
|
||
|
import uulm.teamname.marvelous.gamelibrary.config.CharacterProperties;
|
||
|
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
|
||
|
import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig;
|
||
|
|
||
|
import java.lang.reflect.Array;
|
||
|
import java.util.Arrays;
|
||
|
import java.util.stream.Stream;
|
||
|
|
||
|
public class GameStructureMessage extends BasicMessage {
|
||
|
// TODO: ADD ENUM FOR THIS
|
||
|
String assignment;
|
||
|
|
||
|
/** The name of the first player */
|
||
|
String playerOneName;
|
||
|
|
||
|
/** The name of the second player */
|
||
|
String playerTwoName;
|
||
|
|
||
|
/** The characters that the first player has chosen (and is therefore playing with in this match) */
|
||
|
CharacterProperties[] playerOneCharacters;
|
||
|
|
||
|
|
||
|
/** The characters that the second player has chosen (and is therefore playing with in this match) */
|
||
|
CharacterProperties[] playerTwoCharacters;
|
||
|
|
||
|
/** The {@link PartyConfig Party Configuration} of the current match */
|
||
|
PartyConfig matchconfig;
|
||
|
|
||
|
/** The {@link ScenarioConfig Scenario Configuration} of the current scenario */
|
||
|
ScenarioConfig scenarioconfig;
|
||
|
|
||
|
@JsonIgnore public CharacterConfig getCharacterConfig() {
|
||
|
CharacterConfig characterConfig = new CharacterConfig();
|
||
|
characterConfig.characters = Stream
|
||
|
.concat(Arrays.stream(playerOneCharacters), Arrays.stream(playerTwoCharacters))
|
||
|
.toArray(CharacterProperties[]::new);
|
||
|
return characterConfig;
|
||
|
}
|
||
|
}
|