refactor: changed AssignmentEnum's name to ParticipantType
This commit is contained in:
parent
d4e0ed23bc
commit
78d3fb84d0
@ -1,6 +1,6 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.messages;
|
package uulm.teamname.marvelous.gamelibrary.messages;
|
||||||
|
|
||||||
public enum AssignmentEnum {
|
public enum ParticipantType {
|
||||||
PlayerOne,
|
PlayerOne,
|
||||||
PlayerTwo,
|
PlayerTwo,
|
||||||
Spectator
|
Spectator
|
@ -6,7 +6,7 @@ import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
|
|||||||
import uulm.teamname.marvelous.gamelibrary.config.CharacterProperties;
|
import uulm.teamname.marvelous.gamelibrary.config.CharacterProperties;
|
||||||
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
|
import uulm.teamname.marvelous.gamelibrary.config.PartyConfig;
|
||||||
import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig;
|
import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.AssignmentEnum;
|
import uulm.teamname.marvelous.gamelibrary.messages.ParticipantType;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.BasicMessage;
|
import uulm.teamname.marvelous.gamelibrary.messages.BasicMessage;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.MessageType;
|
import uulm.teamname.marvelous.gamelibrary.messages.MessageType;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ public class GameStructureMessage extends BasicMessage {
|
|||||||
public final MessageType messageType = MessageType.GAME_STRUCTURE;
|
public final MessageType messageType = MessageType.GAME_STRUCTURE;
|
||||||
|
|
||||||
/** The role the client has been assigned to */
|
/** The role the client has been assigned to */
|
||||||
public AssignmentEnum assignment;
|
public ParticipantType assignment;
|
||||||
|
|
||||||
/** The name of the first player */
|
/** The name of the first player */
|
||||||
public String playerOneName;
|
public String playerOneName;
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
package uulm.teamname.marvelous.gamelibrary.json;
|
package uulm.teamname.marvelous.gamelibrary.json;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Disabled;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.*;
|
import static org.assertj.core.api.Assertions.*;
|
||||||
@ -19,8 +16,7 @@ import uulm.teamname.marvelous.gamelibrary.events.Event;
|
|||||||
import uulm.teamname.marvelous.gamelibrary.events.EventBuilder;
|
import uulm.teamname.marvelous.gamelibrary.events.EventBuilder;
|
||||||
import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
||||||
import uulm.teamname.marvelous.gamelibrary.events.GamestateEvent;
|
import uulm.teamname.marvelous.gamelibrary.events.GamestateEvent;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.AssignmentEnum;
|
import uulm.teamname.marvelous.gamelibrary.messages.ParticipantType;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.BasicMessage;
|
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.ErrorMessage;
|
import uulm.teamname.marvelous.gamelibrary.messages.ErrorMessage;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.RoleEnum;
|
import uulm.teamname.marvelous.gamelibrary.messages.RoleEnum;
|
||||||
import uulm.teamname.marvelous.gamelibrary.messages.client.*;
|
import uulm.teamname.marvelous.gamelibrary.messages.client.*;
|
||||||
@ -361,7 +357,7 @@ class JSONTest {
|
|||||||
var message = new GameStructureMessage();
|
var message = new GameStructureMessage();
|
||||||
|
|
||||||
// message.messageType = MessageType.GAME_STRUCTURE;
|
// message.messageType = MessageType.GAME_STRUCTURE;
|
||||||
message.assignment = AssignmentEnum.PlayerOne;
|
message.assignment = ParticipantType.PlayerOne;
|
||||||
message.playerOneName = "Gandalf";
|
message.playerOneName = "Gandalf";
|
||||||
message.playerTwoName = "Bilbo";
|
message.playerTwoName = "Bilbo";
|
||||||
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
||||||
@ -1071,7 +1067,7 @@ class JSONTest {
|
|||||||
var message = new GameStructureMessage();
|
var message = new GameStructureMessage();
|
||||||
|
|
||||||
// message.messageType = MessageType.GAME_STRUCTURE;
|
// message.messageType = MessageType.GAME_STRUCTURE;
|
||||||
message.assignment = AssignmentEnum.PlayerOne;
|
message.assignment = ParticipantType.PlayerOne;
|
||||||
message.playerOneName = "Gandalf";
|
message.playerOneName = "Gandalf";
|
||||||
message.playerTwoName = "Bilbo";
|
message.playerTwoName = "Bilbo";
|
||||||
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
||||||
|
@ -333,7 +333,7 @@ public class MessageDeserializationTest {
|
|||||||
var message = new GameStructureMessage();
|
var message = new GameStructureMessage();
|
||||||
|
|
||||||
// message.messageType = MessageType.GAME_STRUCTURE;
|
// message.messageType = MessageType.GAME_STRUCTURE;
|
||||||
message.assignment = AssignmentEnum.PlayerOne;
|
message.assignment = ParticipantType.PlayerOne;
|
||||||
message.playerOneName = "Gandalf";
|
message.playerOneName = "Gandalf";
|
||||||
message.playerTwoName = "Bilbo";
|
message.playerTwoName = "Bilbo";
|
||||||
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
||||||
|
@ -345,7 +345,7 @@ public class MessageSerializationTest {
|
|||||||
var message = new GameStructureMessage();
|
var message = new GameStructureMessage();
|
||||||
|
|
||||||
// message.messageType = MessageType.GAME_STRUCTURE;
|
// message.messageType = MessageType.GAME_STRUCTURE;
|
||||||
message.assignment = AssignmentEnum.PlayerOne;
|
message.assignment = ParticipantType.PlayerOne;
|
||||||
message.playerOneName = "Gandalf";
|
message.playerOneName = "Gandalf";
|
||||||
message.playerTwoName = "Bilbo";
|
message.playerTwoName = "Bilbo";
|
||||||
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
message.playerOneCharacters = new CharacterProperties[] {racoon, quicksilver, hulk};
|
||||||
|
Loading…
Reference in New Issue
Block a user