Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🎮 2048 Game

A browser-based implementation of the popular 2048 sliding block puzzle game built with Vanilla JavaScript, SCSS, and HTML5.

Live Demo


📌 Description

This project is an interactive, fully functional web implementation of the classic 2048 puzzle. Players combine numbered tiles on a 4x4 grid using arrow keys to reach the tile 2048.

The project uses an Object-Oriented Architecture (OOP) to separate game logic from DOM manipulations, maintaining clean state management and immediate UI updates on every user input.


✨ Features

  • 🕹️ Arrow Key Navigation: Smooth directional grid movements using native keyboard listeners.
  • 📊 Live Score System: Real-time score recalculation on tile merges.
  • 🎨 Dynamic Dynamic Styling: Color-coded tiles using SASS BEM modifiers (field-cell--2, field-cell--4, etc.).
  • 🔄 State Management: Clear transition handling between idle, playing, win, and lose game states.
  • 📱 Compact Centered Layout: Clean CSS Flexbox UI optimized for browser viewports.

🛠️ Tech Stack

  • JavaScript (ES6+): OOP logic, DOM events handling, dynamic CSS class manipulations.
  • HTML5: Semantic table-based board structure.
  • SCSS: Nesting, variables, BEM methodology, and state-driven cell modifiers.
  • Modules: CommonJS / ES Module pattern for game engine isolation.

Installation

  1. Clone the repository:
    git clone https://github.com/Skoulskiy/javascript_2048_game
  2. Install dependencies:
    npm install
  3. Start the development server:
 npm start
  1. Build for production:
npm run build

👤 Author & Contact

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages