if (eatTail(newHead, snake) ) { alert('Вы проиграли!'); document.location.reload(); } setTimeout (drawGame, timed)