diff --git a/index.html b/index.html
index 4bfcff0..f14e0b5 100644
--- a/index.html
+++ b/index.html
@@ -20,11 +20,7 @@
Decode.Me
diff --git a/script.js b/script.js
index f4d71b9..ffc7733 100644
--- a/script.js
+++ b/script.js
@@ -29,6 +29,12 @@ function startGame() {
if (currentIndex > 9) {
message.textContent = 'Congratulations! You won!';
start.style.display = 'block';
+ start.textContent = 'New Game';
+ start.addEventListener('click',(e)=>{
+ boxes.forEach(b => b.classList.remove('flipped'));
+ currentIndex = 1;
+ })
+
}
} else {
message.textContent = 'Wrong sequence! Try again!';
@@ -43,6 +49,7 @@ function startGame() {
}, 3000);
}
+
function shuffle(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
diff --git a/style.css b/style.css
index fe08728..7f56628 100644
--- a/style.css
+++ b/style.css
@@ -69,22 +69,17 @@ body {
& .c3{
top: 280px;
}
- animation: move 20s linear infinite;
-
+ animation: move 10s linear infinite;
}
@keyframes move{
from{
transform: translateX(0%);
}to{
- transform: translateX(-50%);
+ transform: translateX(-25%);
}
}
-
-
-
-
.headder{
width: 100%;
display: flex;