forked from Ankit-29/flipCards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameEnding.html
More file actions
30 lines (28 loc) · 845 Bytes
/
gameEnding.html
File metadata and controls
30 lines (28 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/game.css">
<link rel="stylesheet" href="css/index.css">
<title>Flip-Cards</title>
</head>
<body>
<div class="d-flex flex-col" style="justify-content: center;align-items:center;height:inherit;">
<h1>YOU WIN</h1>
<h2>Total Moves: </h2>
<button class="btn" onclick="gamePage()">Play Again</button>
</div>
</body>
</html>
<script>
if(localStorage.getItem('moves')){
document.querySelector('h2').innerHTML += localStorage.getItem('moves');
localStorage.clear();
} else {
window.location.href = "index.html";
}
gamePage = () =>{
window.location.href = "index.html";
}
</script>