Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Sliding Puzzle Game

A fun and interactive sliding puzzle game built with JavaScript. The goal is to arrange the puzzle pieces into their correct positions by swapping tiles. The game includes a timer, tracks the best completion time, and allows the user to play repeatedly.

Features

  • Puzzle Mechanics: Users can click to swap adjacent pieces to solve the puzzle.
  • Timer: A countdown timer tracks the time taken to solve the puzzle.
  • Best Time Tracking: Tracks the user's best time using cookies.
  • Scramble Functionality: The puzzle pieces are randomly scrambled at the start of each game.
  • Custom Event: A custom event is triggered when the puzzle is solved, displaying a success message and updating the best time if applicable.

Technologies

  • HTML: Provides the structure for the puzzle board and timer display.
  • CSS: Styling for the puzzle pieces and layout.
  • JavaScript: Handles the logic for the puzzle mechanics, timer, and best time tracking.

How to Run

  1. Open the slidingPuzzle_txt.html file in a web browser.
  2. Click the Start button to scramble the puzzle and start the game.
  3. Solve the puzzle by clicking adjacent pieces to move them.
  4. Once solved, your time will be recorded, and if it's your best time, it will replace the previous best.

About This Project

This program was developed as part of an assignment for my programming class. The folder names and structure reflect the required naming convention for class submissions.