Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 1.27 KB

README.md

File metadata and controls

19 lines (16 loc) · 1.27 KB

2048-Game

Description

This project is an implementation of the popular 2048 game using HTML, CSS, and JavaScript. The game is designed to replicate the original 2048 game interface and functionality, allowing players to combine numbered tiles to reach the elusive 2048 tile.

Features

  • HTML Page: The game interface is built using HTML to structure the elements of the game board.
  • CSS Styling: CSS is used to style the game elements, including different styles for tiles representing numbers 2, 4, 8, 16, and so on, up to 2048.
  • JavaScript Functionality: JavaScript is responsible for the game's functionality, including:
    • Swipe Movements: Implementing right, left, up, and down swipe movements to shift tiles on the game board.
    • Random Number Generation: Generating new number blocks randomly when there are empty tiles on the board.
    • Score Calculation: Calculating and updating the player's score based on tile combinations.

How to Play

  • Clone or download the repository to your local machine.
  • Open the index.html file in your web browser.
  • Use the arrow keys or swipe gestures to move tiles on the game board.
  • Combine tiles with the same number to create larger numbers.
  • Keep playing until you reach the 2048 tile or until there are no more possible moves.