the implemenation of the classical game 2048
./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.
node TestinTerminal.js
Use w, a, s, d
as operations.
cd app/
npm install
npm start
Use keyUp, keyRight, keyDown, keyLeft
as operations.