Catalog npm
Back to packageRELEASE DETAILS

0.0.1

npm

2048_functional

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

2048functionalgamejavascript
Published12 Oct 2018
Direct dependencies12
Transitive dependenciesNot calculated

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.

Declared dependencies 12

Native requirements
12 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
babel-cli
Environment
{
  "local_name": "babel-cli",
  "alias": false,
  "peer_metadata": null
}
*development
babel-core
Environment
{
  "local_name": "babel-core",
  "alias": false,
  "peer_metadata": null
}
*development
babel-eslint
Environment
{
  "local_name": "babel-eslint",
  "alias": false,
  "peer_metadata": null
}
*development
babel-preset-env
Environment
{
  "local_name": "babel-preset-env",
  "alias": false,
  "peer_metadata": null
}
*development
babel-preset-stage-0
Environment
{
  "local_name": "babel-preset-stage-0",
  "alias": false,
  "peer_metadata": null
}
*development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
*development
eslint-config-airbnb-base
Environment
{
  "local_name": "eslint-config-airbnb-base",
  "alias": false,
  "peer_metadata": null
}
*development
eslint-plugin-import
Environment
{
  "local_name": "eslint-plugin-import",
  "alias": false,
  "peer_metadata": null
}
*development
eslint-plugin-jest
Environment
{
  "local_name": "eslint-plugin-jest",
  "alias": false,
  "peer_metadata": null
}
*development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
*development
jest-cli
Environment
{
  "local_name": "jest-cli",
  "alias": false,
  "peer_metadata": null
}
*development
js-yaml
Environment
{
  "local_name": "js-yaml",
  "alias": false,
  "peer_metadata": null
}
*development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-/5du3MNoP1t3fb4ZchiQfMdCVMpIJxq1qCnLHspzaoABkhk+RU7vdCW3Fp0l8vFRLMDhdrcCNvfTcyDHRIip3g==",
  "shasum": "5a579747e54adea421ebc50298c7653c0af21b53",
  "tarball": "https://registry.npmjs.org/2048_functional/-/2048_functional-0.0.1.tgz",
  "fileCount": 12,
  "unpackedSize": 27985,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwN67CRA9TVsSAnZWagAA+4IP/iMCxbYM2/8J0rYFzZQY\nyb6pZA/klrL0Wlyx9fGOy960nxLZFCqjRQ1SWL8m8EP98E2LhNv5CeEGus6R\nhpoR6zmQlAMGpyAGoQ+As+6dzR7Q79Facmz2MV0eTJ4BjqAsLOX1RuQ78PPc\n6qbtcbX0d0l3MdgDJG74G3y0A4Ctj4DlWc2ey9zcQgKyirsYCb9WmI8Gh+mc\nY6EULvNSWKqkQHbjhl4YsX5fCoFdeY70cQCbvFTvmpF5F1DrhaLotWitNudp\nmR+qiZOvSofOlHjCLGt5dK26CNK42HxkUQdZoXRPd5hiy9YdXBOCHW8DxY04\nS7EBzoawIvNz0Lxe9WUnkHb8jhxApWkbVQpB+LOG1UqhUvKCdYFAXj1BeFad\n7WFGj2JYHiF4MzjuhttCyi9F2r2RKnnZUglR7LjudAmInN8A/zqV0osjRzfx\nc4+GbRteCLGn1y2k8TBNkqTqJB6EkXtf9BqLYXJWE77ks1djGo5dgQfkzAUB\nS1Pfgv6uzkMqFycmMo+iuy5WA6IAb/wrIWC40JjBDJ3Ja5BOEMTqLzFQRqFT\n96Fa3Ox0LSDLIl7+yE0aWWqHrUuAn2Y7/BOcc/7U7VODAtnfw9C1EzHfZJBq\nh0qV16FukSACMf8I7ikMzBbT9/LU7uZt/rQn7XAXywvSSENBloqIGQ2Qm610\nei/I\r\n=H8iw\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQC6FKPxnEB2lKL6YZUIvZW47aURUOrmaJV2eO/wSk7bewIhANK+VI640DvzzI+QfXtj4tpSK7+QUYKXycjBuFuUgg9c"
    }
  ]
}

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_version:2fcd665747fe5d02db3784ed208e0c0f8c8121a09af5192c5558f3d4384cd3bd

Other collected versions

0.1.117 Nov0.1.014 Nov0.0.212 NovView all collected versions →