Commit 1e7cff86 authored by matthias's avatar matthias

new jdoc, remove cw message base

parent a79d9fb2
......@@ -23,9 +23,17 @@ import java.util.LinkedList;
import java.util.List;
/**
* Created by winfr on 23.08.2016.
* this class
*
* @author winfried
*/
public class IncomingMessagesInterpreter {
/**
*
* @param data
* @return
*/
public CwMessageType getMessageType(String data) {
JSONObject object = new JSONObject(data);
......@@ -42,7 +50,6 @@ public class IncomingMessagesInterpreter {
} else if (object.getString("packageType").equals("finish")) {
return CwMessageType.GameResult;
}
return CwMessageType.Unknown;
}
......@@ -58,7 +65,6 @@ public class IncomingMessagesInterpreter {
} else if (object.getJSONObject("content").getString("standard").equals("Viewer")) {
result.role = ClientRole.Viewer;
}
return result;
}
......@@ -68,7 +74,6 @@ public class IncomingMessagesInterpreter {
CwStartContent result = new CwStartContent();
String[] fullStateArray = object.getJSONObject("content")
.getString("fullState").split(NetworkConstants.FULLSTATESEPARATOR);
List<String> fullStateList = new LinkedList<>();
......@@ -95,7 +100,6 @@ public class IncomingMessagesInterpreter {
} else if (object.getJSONObject("content").getString("standard").equals("ICWS94")) {
result.standard = RcStandard.ICWS94;
}
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment