minor edits of previous commits
This commit is contained in:
parent
ca249361b6
commit
d9be46986e
@ -65,11 +65,11 @@ function serverTransfer(coordinate,team,turn,username) {
|
||||
dataType: "json",
|
||||
contentType: 'application/json;charset=UTF-8'
|
||||
})
|
||||
// Receiving Data
|
||||
// Server Response
|
||||
.then(
|
||||
function success(data) {
|
||||
for (var user in data) {
|
||||
} if (data.hasOwnProperty(user) && (user != username)) {
|
||||
if (data.hasOwnProperty(user) && (user != username)) {
|
||||
console.log(data[user][turn]);
|
||||
var theMove = data[user][turn];
|
||||
updateTable(theMove[1], theMove[2]);
|
||||
@ -199,18 +199,15 @@ function movePlayer(e) {
|
||||
type = "up";
|
||||
clearTimeout(timer);
|
||||
movement(0,-1);
|
||||
} else
|
||||
if(e.keyCode === 40 && type != "down") {
|
||||
} else if (e.keyCode === 40 && type != "down") {
|
||||
type = "down";
|
||||
clearTimeout(timer);
|
||||
movement(0,1);
|
||||
} else
|
||||
if(e.keyCode === 37 && type != "left") {
|
||||
} else if (e.keyCode === 37 && type != "left") {
|
||||
type = "left"
|
||||
clearTimeout(timer);
|
||||
movement(-1,0);
|
||||
} else
|
||||
if(e.keyCode === 39 && type != "right") {
|
||||
} else if (e.keyCode === 39 && type != "right") {
|
||||
type = "right"
|
||||
clearTimeout(timer);
|
||||
movement(1,0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user