Catalog npm
PACKAGE EXPLORERView in registry

2048-cli

npm

Play 2048 in your terminal

Versions collected3
Direct dependencies16From release 0.1.2
Last observed20 Oct, 18:55 UTC

README

Current package documentation

2048

CLI implementaiton of the game "2048".

screenshot of the game playing in the cli

Playing

Quickly:

$ npx 2048-cli

From source:

$ git clone https://github.com/ozziexsh/2048.git
$ cd 2048
$ npm i
$ npm start

Testing

Testing done via jest

$ npm test

Contributing

PR's welcome!

Tech stack is

  • Node
  • TypeScript
  • React
  • ink
  • jest
  • Prettier
  • ESLint

The code is broken out into a few pieces:

  • board.ts - This is the class that handles the position of numbers on the board as well as moving them around. Contains logic for combing numbers together however doesn't perform any special checks when calling the respective moveXyz methods.
  • game.ts - This class contains a single board instance and performs more logic around the moves such as spawning new numbers.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 3

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.2Registry latest28 Dec 202016
0.1.127 Dec 202016
0.1.027 Dec 202016

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:55 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c94fb5b717456215a0335dc5de4528e9c03c9351fdf53b38181233d27dba0b49