Skip to content

A sliding picture puzzle game created using HTML/CSS and JavaScript

Notifications You must be signed in to change notification settings

mehad123/Sliding-Picture-Puzzle-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sliding Picture Puzzle Game

Welcome to the Sliding Picture Puzzle Game! This game is a classic sliding puzzle where the goal is to rearrange the scrambled tiles to form a complete image. The game includes features such as a timer and move counter to challenge you to solve the puzzle as quickly and efficiently as possible.

Table of Contents

Installation

To get started with the Sliding Picture Puzzle Game, follow these steps:

  1. Clone the repository:
    git clone https://github.com/yourusername/sliding-picture-puzzle-game.git
  2. Navigate to the project directory:
    cd sliding-picture-puzzle-game
  3. Open index.html in your web browser:
    open index.html
    

Usage

  1. Load the game: Open the index.html file in your favorite web browser.
  2. Start a new game: Click on the "New Game" button to shuffle the tiles and start the timer.
  3. Move tiles: Click on any tile adjacent to the empty space (white tile) to move it into the empty space.
  4. Track your progress: The game will display the number of moves you have made and the time spent on the current game.
  5. Simple game: Click the "Simple Game" button to reset the puzzle to a nearly solved state, allowing you to solve it in just one move.
  6. Win the game: Arrange the tiles to form the complete image to win. A congratulatory message will appear, and you can choose to start a new game.

Game Features

  • Tile Swapping: Click on tiles adjacent to the empty space to swap them.
  • Timer: Tracks the time spent on the current game.
  • Move Counter: Tracks the number of moves made during the current game.
  • Shuffle Function: Randomizes the tiles to start a new game.
  • Simple Game Function: Resets the puzzle to a nearly solved state for an easy win.
  • Win Detection: Alerts the player upon successfully arranging the tiles in the correct order.

Files Included

  • index.html: The main HTML file that structures the game.
  • style.css: The CSS file that styles the game.
  • script.js: The JavaScript file that contains the game logic.
  • pokemon.jpg: The image used for the puzzle.
  • favicon.ico: The browser icon image for the game's site.

About

A sliding picture puzzle game created using HTML/CSS and JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published