diff --git a/src/main/resources/static/javascript/game.js b/src/main/resources/static/javascript/game.js index 76ef306..7997812 100644 --- a/src/main/resources/static/javascript/game.js +++ b/src/main/resources/static/javascript/game.js @@ -54,18 +54,6 @@ class Board { } } -class ResponseMessage { - @JsonProperty() @JsonClassType({type: () => [String]}) - type: string; - - @JsonProperty() @JsonClassType({type: () => [String]}) - body: string; -} - -class ServerGamePlayer { - -} - const top_offset = 18; const board = new Board(); @@ -89,13 +77,6 @@ function sendMessage(message, type) { })); } -function deserializeMe(data) { - let jsonParser = new JsonParser(); - console.log(jsonParser.transform(response, { - mainCreator: () => [ResponseMessage] - })); -} - $(document).ready(function() { let chips = []; $(".chip").each(function() { @@ -113,8 +94,7 @@ $(document).ready(function() { socket.onmessage = function(e) { console.log('message', e.data); - deserializeMe(e.data); - showMessage(JSON.parse(e.data)); + showMessage(JSON.parse(e.data)[1]); }; socket.onclose = function() { diff --git a/src/main/resources/templates/game.html b/src/main/resources/templates/game.html index 43f2de8..defad2c 100644 --- a/src/main/resources/templates/game.html +++ b/src/main/resources/templates/game.html @@ -247,7 +247,6 @@