Code Monkey home page Code Monkey logo

2048's Introduction


2048

View Demo

Table of Contents
  1. About The Project
  2. Getting Started
  3. Config

About The Project

A web implementation of the hit 2048 game where you have to combine tiles until you reach a specific number.

(back to top)

Built With

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

  1. Clone the repo
    git clone https://github.com/yankostadinov/2048.git
  2. Install NPM packages
    yarn
  3. Build and run the project
    yarn dev

You should now be able to load the game here: http://localhost:5173/2048/

(back to top)

Config

Edit src/config.js to configure different aspects of the game:

  • size: The square grid size. Size 6 creates a grid with 6 rows and 6 columns for a total of 36 tiles.
  • obstacles: Number of obstacles placed on the grid to increase difficulty by blocking the movement of tiles.
  • targetPower: The power of 2 that you must reach to win the game. A targetPower of 11 means you need to create a tile of value 2048.
  • keyboardShortcutsEnabled: Disables keyboard arrow shortcuts to move the tiles.
  • powerColors: Colors for different powers of tiles. Make sure to add more colors if increasing the targetPower.

(back to top)

Contact

Yan Kostadinov - [email protected]

(back to top)

2048's People

Contributors

yankostadinov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.