tambah java

This commit is contained in:
Nathan 2025-12-01 12:41:04 +07:00
parent 533a9918d5
commit 3b7753315b
3 changed files with 25 additions and 11 deletions

View File

@ -13,14 +13,10 @@ body {
align-items: center; align-items: center;
padding: 6px 10px; padding: 6px 10px;
width: 100%; width: 100%;
background: rgb(255, 255, 255);
backdrop-filter: blur white(14px);
background: rgba(255, 255, 255, 0.25);
backdrop-filter: blur(14px);
border-top: 2px solid rgba(255, 255, 255, 0.4); border-top: 2px solid rgba(255, 255, 255, 0.4);
border-bottom: 2px solid rgba(255, 255, 255, 0.4); border-bottom: 2px solid rgba(255, 255, 255, 0.4);
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -5,22 +5,23 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Memory Card</title> <title>Memory Card</title>
<link rel="stylesheet" href="gameboard.css"> <link rel="stylesheet" href="gameboard.css">
<script src=""></script>
</head> </head>
<body> <body>
<div id = "container"> <div id = "container">
<header class="topbar"> <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="right-info">
<div class="pill"> <div class="pill">
<span class="icon"></span> 60s <span class="icon"></span> <span id="timer">60</span>s
</div> </div>
<div class="pill"> <div class="pill" id="score">
<span class="icon"></span> 0 <span class="icon"></span> 0
</div> </div>
<div class="pill"> <div class="pill" id="move-count">
<span class="icon">🎯</span> 0 <span class="icon">🎯</span> 0
</div> </div>

17
gameboard.js Normal file
View 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);