Skip to content

Commit

Permalink
Added new features
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince-GH committed Sep 3, 2024
1 parent 943c182 commit a525050
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 4 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
<div class="cloud-block cloud-block-1"></div>
<div class="cloud-block cloud-block-2"></div>
</div>
<div class="cloud c3">
<div class="cloud-block cloud-block-1"></div>
<div class="cloud-block cloud-block-2"></div>
</div>
<div class="cloud c1">
<div class="cloud c1 ">
<div class="cloud-block cloud-block-1"></div>
<div class="cloud-block cloud-block-2"></div>
</div>
Expand All @@ -35,7 +31,9 @@
<div class="cloud c3">
<div class="cloud-block cloud-block-1"></div>
<div class="cloud-block cloud-block-2"></div>
</div>
</div>


</div>
<div class="headder">
<div class="logo">Decode.Me</div>
Expand Down
7 changes: 7 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!';
Expand All @@ -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));
Expand Down
9 changes: 2 additions & 7 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a525050

Please sign in to comment.