if (whichberry.offsetLeft < whichplayer.offsetLeft) {
            whichplayer.style.left = whichplayer.offsetLeft - 40 + "px";
        } else if (whichberry.offsetLeft > whichplayer.offsetLeft) {
            whichplayer.style.left = whichplayer.offsetLeft + 40 + "px";
        }