Server game logic

This commit is contained in:
Thomas
2020-08-21 14:18:18 +02:00
parent 932b591728
commit 861105eb92
11 changed files with 114 additions and 33 deletions

View File

@@ -30,10 +30,8 @@ public class SocketHandler extends TextWebSocketHandler {
String type = (String) jsonObject.get("type");
switch (type) {
case "alive":
break;
case "update":
gameManager.update(session, (Player) jsonObject.get("update"));
gameManager.updatePlayer(session, (Player) jsonObject.get("update"));
break;
default:
SocketUtils.sendMessage(session, "error", "unknow command");