Skip to content

SrTrace/2048-game

Repository files navigation

2048 Game

This project is a JavaScript implementation of the popular game 2048. In this game, players combine tiles of the same number to reach the tile with the number 2048. The game is played on a 4x4 grid, where each move slides all tiles in one of four directions (up, down, left, right). When two tiles of the same number collide while moving, they merge into a tile with the total of their numbers. The goal is to create a tile with the number 2048.

Technologies Used

  • JavaScript (ES6+): The main language used for the game logic, including classes and modules.
  • HTML & CSS: For structuring and styling the game interface.

Preview

You can view a live preview of the game here.

Getting Started

To get a local copy of the game up and running, follow these steps:

Prerequisites

  • Make sure you have Node.js installed on your system.

Installation

  1. Clone the repository:
    git clone https://github.com/srtrace/2048-game.git
    cd 2048-game
  2. Install dependencies:
 npm install
  1. Open the project in your preferred editor.

  2. Run the game:

    • Since the game is built with JavaScript modules, you can open the index.html file directly in a browser to play.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published