Emm 2048 RESET

This commit is contained in:
2024-08-28 01:42:35 +02:00
parent f1e710de21
commit 0bfe2d76a8
6 changed files with 31 additions and 8 deletions

View File

@@ -1,7 +1,13 @@
var board;
const newBoard = [
[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
];
var score = 0;
var rows = 4;
var columns = 4;
const rows = 4;
const columns = 4;
let startX, startY, endX, endY;
window.onload = function(){
@@ -216,4 +222,13 @@ function handleSwipe(){
document.getElementById("score").innerText = score;
}
}
}
async function reset(){
document.getElementById("board").innerHTML = '';
setGame();
score = 0;
document.querySelector('#score').innerText = '0';
/*board = newBoard;
setTwo();
setTwo();*/
}