From 1ab595fab268090bdc2242e73c3b21d5a1812599 Mon Sep 17 00:00:00 2001 From: Khushipawar37 Date: Fri, 7 Jun 2024 15:21:44 +0530 Subject: [PATCH] Added the instructions button --- game.js | 7 +++ index.html | 122 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 91 insertions(+), 38 deletions(-) diff --git a/game.js b/game.js index fe6e1af..57a917a 100644 --- a/game.js +++ b/game.js @@ -3914,3 +3914,10 @@ function applyGradient() { document.querySelector('.content').style.background = `linear-gradient(${direction}, ${color1}, ${color2})`; toggleGradientSelector(); // Close the selector container after applying the gradient } + +// Function to display instructions + +document.querySelector('.instructions').addEventListener('click', () => { + const instructionsBox = document.getElementById('instructionsBox'); + instructionsBox.style.display = instructionsBox.style.display === 'none' || instructionsBox.style.display === '' ? 'block' : 'none'; +}); \ No newline at end of file diff --git a/index.html b/index.html index 8f33c9a..96d0663 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,14 @@ + PACKABUNCHAS - + + -
- - -
- - - - - - - +
+ +
+
+ +
+
+ + + + + + + +
+
+

Game Instructions

+

Welcome to the game! Here are the instructions:

+
    +
  • Drag the puzzle pieces.
  • +
  • You can change thier direction by double clicking on it.
  • +
  • Adjust the puzzle pieces to completely occupy the given space.
  • +
  • Have fun!
  • +
+
- -
- + - + \ No newline at end of file