From 4f58af98aa07dc1424990919fee59b510d06a873 Mon Sep 17 00:00:00 2001 From: yamanq Date: Wed, 8 Jul 2015 01:06:09 -0400 Subject: [PATCH] do not do code for local user move twice --- clashingcomrades/static/main.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/clashingcomrades/static/main.js b/clashingcomrades/static/main.js index e295371..9f82074 100644 --- a/clashingcomrades/static/main.js +++ b/clashingcomrades/static/main.js @@ -68,14 +68,8 @@ function serverTransfer(coordinate,team,turn,username) { }) .then( function success(data) { - //******************************* - // TODO Use moves given by server - //******************************* - - console.log(data); - for (var user in data) { - if (data.hasOwnProperty(user)) { + if (data.hasOwnProperty(user) && (user != username)) { console.log(data[user][turn]); var theMove = data[user][turn]; tableUpdate(theMove[1], theMove[2]);