resolved commit issues
This commit is contained in:
commit
d291132a24
@ -91,9 +91,6 @@ function serverTransfer(coordinate,team,turn,username) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Creation of Table
|
// Creation of Table
|
||||||
|
|
||||||
function tableCreate() {
|
function tableCreate() {
|
||||||
@ -123,7 +120,6 @@ function oldTableUpdate(coordinate, team) {
|
|||||||
current.style.backgroundColor = claimedColors[team];
|
current.style.backgroundColor = claimedColors[team];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creation of Player
|
// Creation of Player
|
||||||
|
|
||||||
function createPlayer() {
|
function createPlayer() {
|
||||||
@ -131,12 +127,12 @@ function createPlayer() {
|
|||||||
table.rows[coordinate[0]].cells[coordinate[1]].className = "player ";
|
table.rows[coordinate[0]].cells[coordinate[1]].className = "player ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function movement(x,y) {
|
function movement(x,y) {
|
||||||
timer =
|
timer =
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
try {
|
try {
|
||||||
if (table.rows[coordinate[0] + y].cells[coordinate[1] + x].className.includes(team)) {
|
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];
|
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = claimedColors[team];
|
||||||
document.getElementsByClassName('player')[0].className = "";
|
document.getElementsByClassName('player')[0].className = "";
|
||||||
spectatorMode();
|
spectatorMode();
|
||||||
@ -155,6 +151,10 @@ function movement(x,y) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
|
//Kills Player
|
||||||
|
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = claimColor;
|
||||||
|
document.getElementsByClassName('player')[0].className = "";
|
||||||
|
spectatorMode();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user