https://github.com/yanceyy/2048
2048 game based on webcomponents
https://github.com/yanceyy/2048
2048 game javascript javascript-game web-components
Last synced: 3 months ago
JSON representation
2048 game based on webcomponents
- Host: GitHub
- URL: https://github.com/yanceyy/2048
- Owner: yanceyy
- License: mit
- Created: 2023-05-02T01:05:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T06:03:30.000Z (almost 2 years ago)
- Last Synced: 2025-01-14T00:40:55.856Z (5 months ago)
- Topics: 2048, game, javascript, javascript-game, web-components
- Language: JavaScript
- Homepage: https://2048web.vercel.app
- Size: 1.05 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
![]()
Welcome to the 2048 WebComponents Game repository. This is a modern interpretation of the popular 2048 game, leveraging the power of WebComponents for modular, reusable, and encapsulated code. The game also introduces theme change functionality, allowing you to customize the look and feel of your gaming experience.
# Paly it online
Play on [Vercel](https://2048web.vercel.app)
# Run it locally
Before you start, ensure that you have `Node.js` and `pnpm` installed.
Install the required dependencies:
```bash
pnpm install
pnpm dev
```To start the game, navigate to [localhost:5173](http://localhost:5173/) (or the port indicated in your terminal) in your web browser. Use your arrow keys to move the tiles. Tiles with the same number merge into one when they touch, and the goal is to earn as much score as you can.
You can change the theme of the game using the theme switch provided in the top panel. Choose from a range of pre-set themes to enhance your gaming experience.
# License
This 2048 Game is open-sourced software licensed under the MIT license.