resolved commit issues

This commit is contained in:
yamanq 2015-07-08 00:55:23 -04:00
commit d291132a24

View File

@ -91,9 +91,6 @@ function serverTransfer(coordinate,team,turn,username) {
);
}
// Creation of Table
function tableCreate() {
@ -123,7 +120,6 @@ function oldTableUpdate(coordinate, team) {
current.style.backgroundColor = claimedColors[team];
}
// Creation of Player
function createPlayer() {
@ -131,12 +127,12 @@ function createPlayer() {
table.rows[coordinate[0]].cells[coordinate[1]].className = "player ";
}
function movement(x,y) {
timer =
setTimeout(function() {
try {
if (table.rows[coordinate[0] + y].cells[coordinate[1] + x].className.includes(team)) {
// Kills Player
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = claimedColors[team];
document.getElementsByClassName('player')[0].className = "";
spectatorMode();
@ -155,6 +151,10 @@ function movement(x,y) {
}
}
catch(err) {
//Kills Player
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = claimColor;
document.getElementsByClassName('player')[0].className = "";
spectatorMode();
}
}, 100);
}