<div>
<p>player1</p>
<button class="fas fa-plus-square btn btn-plus" onclick="plusState(this)">Plus</button>
<button class="fas fa-check-square btn btn-check">Check</button>
<button class="fas fa-minus-square btn btn-delete">Delete</button>
</div>
<script>
function plusState(element){
const player = element.parentElement.querySelector('p').innerText // player1
players[player].stateOnSat = true
}
</script>
<div class="block">
<div class="block_one">
</div>
<div class="block_one">
</div>
<div class="block_one">
</div>
<div class="block_one">
</div>
<div class="block_one">
</div>
<div class="block_one">
</div>
<script>
const block = document.querySelector('.block')
block.addEventListener('mouseover', event => {
if (event.target != block) event.target.classList.add('newClass') // Добавляем класс на дочерний элемент
})
</script>
<style>
.image {
position: relative;
height: auto;
width: auto;
display: flex;
width: 400px;
}
.image__overlay {
background: gray;
height: 100%;
width: 100%;
position: absolute;
opacity: 0.7;
}
</style>
<div class="image">
<img src="https://im0-tub-ru.yandex.net/i?id=14c13556dbc47474132b8bf4a806752e&n=13">
<div class="image__overlay"></div>
</div>