make sure marseko always appear in view

pull/143/head
Aevann 2023-04-30 00:04:57 +02:00
parent 631b7af1f7
commit 1368e236db
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
const marsekoEl = document.getElementById("marseko");
function getRandomInt(max) {
return Math.max(32, Math.floor(Math.random() * max));
return Math.max(32, Math.floor(Math.random() * max) - 16);
}
let marsekoPosX = getRandomInt(screen.availWidth);
let marsekoPosY = getRandomInt(screen.availHeight);