Skip to content

This project is a web-based implementation of the classic 15 Puzzle Game using ReactJS. In this game, players are presented with a grid of tiles, each containing a number from 1 to 15, and one empty space. The objective is to rearrange the tiles by sliding them into the empty space until they are ordered from 1 to 15.

License

Notifications You must be signed in to change notification settings

swetamishra123/15-PUZZLE-GAME

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

15 Puzzle Game using ReactJS

This project is a web-based implementation of the classic 15 Puzzle Game using ReactJS. In this game, players are presented with a grid of tiles, each containing a number from 1 to 15, and one empty space. The objective is to rearrange the tiles by sliding them into the empty space until they are ordered from 1 to 15.

Features

  • Drag and drop functionality to move tiles into the empty space.
  • Timer to track the duration of the game.
  • Responsive design for seamless gameplay across devices.

Technologies Used

  • ReactJS
  • Tailwind CSS
  • JSX

Project Structure

  • components:
    • Game.js: Contains the main logic of the game and renders all required components.
    • Puzzle.js: Component for rendering the puzzle grid.
    • Tile.js: Component for rendering individual tiles.
    • Timer.js: Component for displaying and managing the game timer.
  • utils:
    • shuffleFunction.js: Utility function to shuffle the array of numbers for initializing the puzzle.

How to Run

  1. Clone this repository.
  2. Navigate to the project folder.
  3. Install dependencies using npm install.
  4. Start the development server with npm start.
  5. Open your web browser and go to http://localhost:3000/.

Preview

[Add a screenshot or GIF of the game in action]

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.

License

This project is licensed under the MIT License.

Acknowledgements

  • Mention any libraries, tutorials, or resources you used in developing this project.
  • Give credit to any individuals or organizations that provided inspiration or support.

Contact

For any inquiries or feedback, please contact Your Name.

Enjoy playing the 15 Puzzle Game! 🎉

About

This project is a web-based implementation of the classic 15 Puzzle Game using ReactJS. In this game, players are presented with a grid of tiles, each containing a number from 1 to 15, and one empty space. The objective is to rearrange the tiles by sliding them into the empty space until they are ordered from 1 to 15.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published