<div id="stone"></div>
#stone {
width: 100px;
height: 100px;
background: red;
cursor: pointer;
transition: background 0.3s;
}
const stone = document.querySelector('#stone');
let isRed = true;
stone.addEventListener('click', function() {
if (isRed) {
stone.style.background = 'green';
isRed = false;
} else {
stone.style.background = 'orange';
isRed = true;
}
});