Catalog npm
PACKAGE EXPLORERView in registry

2048_functional

npm

A library based in a functional programming paradigm to creates a 2048 game.

2048functionalgamejavascript
Versions collected4
Direct dependencies12From release 0.1.1
Last observed20 Oct, 18:55 UTC

README

Current package documentation

Build Status

Maintainability

Test Coverage

game 2048 library

A library based in a functional programming paradigm to creates a 2048 game.

Docs API

addNumberToPlayField

addNumberToPlayField(playField)

Adds a random number (2 or 4) instead of one of the empty cells.

initPlayField

initPlayField()

Creates a new playing field with empty cells and adds a random number (2 or 4) on a randomly selected cell.

movePlayField

movePlayField(playField, direction)

Makes a move on the playing field in the specified direction.

###isWin isWin(playField)

Checks if there is a cell with the number 2048 on the playing field.

isLoss

isLoss(playField)

If all cells are occupied and it is impossible to make a move, then the player is defeated.

Downloads & popularity

Awaiting observations

No metric observations yet

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

Versions 4

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1Registry latest17 Nov 201812
0.1.014 Nov 201812
0.0.212 Nov 201812
0.0.112 Oct 201812

Package advisories

0
No matching advisories collected

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

Repository

PENDING
usmanaav/game-2048-library-functional

Shared repository data · GitHub

License detected in repository
Not collected

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:0b6df4688d98294766a066617ee5df4b88fbb2a26cebaa7baea85d449677e565