do not do code for local user move twice
This commit is contained in:
parent
d291132a24
commit
4f58af98aa
@ -68,14 +68,8 @@ function serverTransfer(coordinate,team,turn,username) {
|
|||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
function success(data) {
|
function success(data) {
|
||||||
//*******************************
|
|
||||||
// TODO Use moves given by server
|
|
||||||
//*******************************
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
for (var user in data) {
|
for (var user in data) {
|
||||||
if (data.hasOwnProperty(user)) {
|
if (data.hasOwnProperty(user) && (user != username)) {
|
||||||
console.log(data[user][turn]);
|
console.log(data[user][turn]);
|
||||||
var theMove = data[user][turn];
|
var theMove = data[user][turn];
|
||||||
tableUpdate(theMove[1], theMove[2]);
|
tableUpdate(theMove[1], theMove[2]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user