fixed animation
This commit is contained in:
parent
4f58af98aa
commit
3bc4dbb765
@ -103,15 +103,14 @@ function tableCreate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tableUpdate (coordinate, team) {
|
function tableUpdate (coordinate, team) {
|
||||||
current = table.rows[coordinate[0]].cells[coordinate[1]];
|
table.rows[coordinate[0]].cells[coordinate[1]].className = "player ";
|
||||||
current.className = "player ";
|
table.rows[coordinate[0]].cells[coordinate[1]].className += team;
|
||||||
current.className += team;
|
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = playerColors[team];
|
||||||
current.style.backgroundColor = playerColors[team];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function oldTableUpdate(coordinate, team) {
|
function oldTableUpdate(coordinate, team) {
|
||||||
current.className = current.className.replace("player ", "");
|
table.rows[coordinate[0]].cells[coordinate[1]].className = table.rows[coordinate[0]].cells[coordinate[1]].className.replace("player ", "");
|
||||||
current.style.backgroundColor = claimedColors[team];
|
table.rows[coordinate[0]].cells[coordinate[1]].style.backgroundColor = claimedColors[team];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creation of Player
|
// Creation of Player
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user