In this section of our code, the function moveTile is responsible for moving a tile. How can I modify it so that the hover color changes to red?
function moveTile(identity) {
var emptyId = findEmptySpace();
if (isEmptyNeighbor(identity)) {
document.getElementById(identity).id = emptyId;
document.getElementById(emptyId).onmouseover = function () {
document.getElementById(emptyId).style.backgroundColor = "red";
};
document.getElementById(emptyId).onclick = (function (identity) {
return function () {
moveTile(identity);
};
}(emptyId));
}
}