Skip to content
/ 2048 Public
generated from mate-academy/gulp-template

This repository contains a fully functional implementation of the 2048 game. Slide numbered tiles on a grid to combine them and reach the 2048 tile! Built with JavaScript, it features smooth animations, score tracking, and an intuitive user interface for desktop and mobile.

License

Notifications You must be signed in to change notification settings

Aiiyuu/2048

Repository files navigation

🎮 2048 Game

A fun and addictive 2048 sliding puzzle game built with JavaScript, OOP concepts, and SCSS. Enjoy smooth animations, sound effects, and a modern UI as you combine tiles to reach 2048!


🚀 Features

  • ✅ Fully playable 2048 game
  • ✅ Smooth animations with SCSS
  • ✅ Built with JavaScript using Object-Oriented Programming
  • ✅ Sound effects for tile movement and merges
  • ✅ Score tracking and high-score memory
  • ✅ Mobile and desktop friendly
  • ✅ Responsive and intuitive design

🖼️ Screenshots

Game Screenshot

🎨 Built With

  • JavaScript – Game logic and OOP architecture
  • SCSS – Smooth animations and styling
  • HTML5 – Structure and layout

🛠️ How to Play

  1. Use arrow keys (or swipe on mobile) to move tiles.
  2. Combine tiles of the same number to create higher-value tiles.
  3. Your goal: reach the 2048 tile!
  4. Try to get the highest score possible.

💡 OOP Concepts Used

  • Classes for Game, Movement, and Score
  • Encapsulation of tile behavior and game logic
  • Methods for movement, merging, and score updating
  • Event handling for user input and sound effects

🎵 Sounds

  • Tile move sound
  • Background music
  • Win sound
  • Game over sound

Sounds are triggered programmatically using JavaScript’s Audio API for an interactive experience.


⚡ Getting Started

Follow these steps to get the 2048 game running locally on your machine:

Step 1 — Clone the Repository

Open your terminal and run:

git clone https://github.com/aiiyuu/2048.git

This will download the project to your local machine.

Step 2 — Navigate to the Project Folder

Change directory into the cloned repository:

cd 2048

Step 3 — Start the Game

You can now start the game:

npm start

Or simply open the index.html in your browser.

Step 4 — Play & Enjoy!

The game should now be running in your browser. Use arrow keys (or swipe on mobile) to move tiles and try to reach 2048!


❤️ Credits

Made with 💖 by Nazariy Holovach

About

This repository contains a fully functional implementation of the 2048 game. Slide numbered tiles on a grid to combine them and reach the 2048 tile! Built with JavaScript, it features smooth animations, score tracking, and an intuitive user interface for desktop and mobile.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors