Skip to content

nadfri/2048

Repository files navigation

2048

Welcome to 2048, a replica of the famous puzzle game where the goal is to reach the 2048 tile by combining tiles of the same value. This project is developed using React, TypeScript, and Vite to provide a smooth and responsive experience, whether on desktop or mobile.

You can play 2048 directly online via this link: https://2048-nadfrijs.netlify.app/

Screenshot Screenshot

Key Features

  • Keyboard Controls: Use the arrow keys to move the tiles.
  • Touch Gestures: Compatible with mobile devices for intuitive movements.
  • Auto Save: Your progress is automatically saved in local storage.
  • Undo Option: Revert to the previous state if needed.
  • Responsive Design: Adapted to different screen sizes for an optimal experience on all devices.
  • Progressive Web App: Can be installed on any device and works offline.

Technologies Used

  • React - JavaScript library for building user interfaces.
  • TypeScript - JavaScript superset that adds static typing.
  • Vite - Fast build tool for modern front-end projects.
  • Vite PWA - PWA plugin for Vite making the app installable and offline-capable.
  • Zustand - Lightweight state management with persist middleware for local storage.
  • ESLint & Prettier - Tools for code linting and formatting.
  • Sass - CSS preprocessor for more organized styling.

Installation

Steps

  1. Clone the repository

    git clone https://github.com/nadfri/2048.git
  2. Navigate to the project directory

    cd 2048
  3. Install dependencies

    npm install
    # or
    yarn install
  4. Start the development server

    npm run dev
    # or
    yarn dev

About

2048 Game in React + Zustand

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published