Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 616 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 616 Bytes

Game2048

the implemenation of the classical game 2048

Get Started

./2048.js is a library implementing the core logic of Game 2048. There are two simple examples to use this library in both terminal and browser: TestinTerminal.js is a sample to use the library in terminal, whereas the directory ./app is a sample to implement the game in browser, with react.js interacting with this libaray.

Run in terminal

node TestinTerminal.js

Use w, a, s, d as operations.

Run in browser

cd app/
npm install
npm start

Use keyUp, keyRight, keyDown, keyLeft as operations.