Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

106 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

2048-Game

This project is an implementation of the famous 2048 game using HTML, CSS, and JavaScript. It allows players to merge tiles to reach the number 2048 using arrow keys or touch gestures.

๐Ÿš€ Features

โœ… Responsive interface for both mobile and desktop. โœ… Tile movement via keyboard (arrows) and touch (swipe) โœจ. โœ… Score and timer display during the game โณ. โœ… Visual effects and CSS animations for a better experience ๐ŸŽจ. โœ… Pause โธ and Retry ๐Ÿ”„ buttons. โœ… Victory message disappears after 10 seconds so that the user can continue playing ๐ŸŽ‰.

๐Ÿ“‚ File Structure

/2048-Game
โ”‚-- index.html      # Homepage
โ”‚-- game.html       # Game page
โ”‚-- style.css       # Styles and animations
โ”‚-- script.js       # Visual effects (stars, etc.)
โ”‚-- game.js         # Game logic (movements, merging, scoring...)
โ”‚-- switch-150130.mp3  # Movement sound effect
|-- game-start-6104.mp3 # Start sound effect
โ”‚-- README.md       # Project documentation

๐ŸŽฎ How to Play?

  1. Launch the game by opening index.html in a browser ๐ŸŒ

  2. Use arrow keys โฌ†๏ธโฌ‡๏ธโฌ…๏ธโžก๏ธ or swipe on mobile ๐Ÿ“ฑ

  3. Merge tiles to reach 2048 ๐ŸŽฏ

  4. Win by reaching 2048! Otherwise, try again ๐Ÿ”„

About

This project is an implementation of the famous 2048 game using HTML, CSS, and JavaScript. It allows players to merge tiles to reach the number 2048 using arrow keys or touch gestures.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages