tambah java
This commit is contained in:
parent
533a9918d5
commit
3b7753315b
@ -13,14 +13,10 @@ body {
|
||||
align-items: center;
|
||||
padding: 6px 10px;
|
||||
width: 100%;
|
||||
|
||||
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
backdrop-filter: blur(14px);
|
||||
|
||||
background: rgb(255, 255, 255);
|
||||
backdrop-filter: blur white(14px);
|
||||
border-top: 2px solid rgba(255, 255, 255, 0.4);
|
||||
border-bottom: 2px solid rgba(255, 255, 255, 0.4);
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
@ -5,22 +5,23 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Memory Card</title>
|
||||
<link rel="stylesheet" href="gameboard.css">
|
||||
<script src=""></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id = "container">
|
||||
<header class="topbar">
|
||||
<button class="back-btn">←</button>
|
||||
<button class="back-btn" onclick="window.location.href='mainboard.html'">←</button>
|
||||
|
||||
<div class="right-info">
|
||||
<div class="pill">
|
||||
<span class="icon">⏱</span> 60s
|
||||
<span class="icon">⏱</span> <span id="timer">60</span>s
|
||||
</div>
|
||||
|
||||
<div class="pill">
|
||||
<div class="pill" id="score">
|
||||
<span class="icon">⭐</span> 0
|
||||
</div>
|
||||
|
||||
<div class="pill">
|
||||
<div class="pill" id="move-count">
|
||||
<span class="icon">🎯</span> 0
|
||||
</div>
|
||||
|
||||
|
||||
17
gameboard.js
Normal file
17
gameboard.js
Normal file
@ -0,0 +1,17 @@
|
||||
let time = 60;
|
||||
let timerElement = document.getElementById("timer");
|
||||
|
||||
let countdown = setInterval(() => {
|
||||
|
||||
time--;
|
||||
timerElement.textContent = time;
|
||||
|
||||
if (time <= 0) {
|
||||
clearInterval(countdown);
|
||||
timerElement.textContent = "0";
|
||||
|
||||
alert("Waktu Habis");
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user