Catalog npm
Back to packageRELEASE DETAILS

1.0.1

npm

2048game

The original 2048 game 100% functional

2048gameseyron
Published24 Aug 2020
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

Logo Un npm que recrea el juego 2048 del navegador Creador

Instalación

Antes de instalarlo, debe tener instalado Node.js La instalación se realiza mediante el comando de instalación npm:

$ npm install 2048game --save

Metodos

estado

Este metodo se usa para que el npm te envie el estado de la partida y acepta 1 argumento que puede ser true o false.

Ejemplo

const game = require("2048game")
const partida = new game.partida()
let estado = partida.estado(false)
console.log(estado)

mover

Este metodo acepta las direcciones basicas para mover las fichas

  • arriba
  • abajo
  • izquierda
  • derecha

Ejemplo

const game = require("2048game")
const partida = new game.partida()
partida.mover("arriba")

reiniciar

Este metodo se usa para reiniciar la partida y empezar una nueva, no necesita argumentos.

Ejemplo

const game = require("2048game")
const partida = new game.partida()
partida.reiniciar()

puntuacion

Puntuación no es una función sino una caracteristica

Ejemplo

const game = require("2048game")
const partida = new game.partida()
console.log(partida.puntuacion)

Ejemplo general

const game = require("2048game")
const partida = new game.partida()
let estado = partida.estado(false)
console.log(estado) // Esto devolvera el estado de la partida
partida.mover("arriba") //Esto moveria todas las fichas hacia arriba
estado = partida.estado(false)
console.log(estado)

Creado por: Discord Safe

Downloads & popularity

Awaiting observations

No metric observations yet

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

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
2048_functional
Environment
{
  "local_name": "2048_functional",
  "alias": false,
  "peer_metadata": null
}
^0.1.1runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-qEE43XqvDXRtl7T3eyDzMD7BAXI491Il3Lqig9PXgjr6ydVhPpK78n0DBXSUPqSE2znX78pnonjQAUkSfA1cuA==",
  "shasum": "953fea1bf2da12e2ea4f39dc906c1a040426f080",
  "tarball": "https://registry.npmjs.org/2048game/-/2048game-1.0.1.tgz",
  "fileCount": 4,
  "unpackedSize": 5891,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRDOoCRA9TVsSAnZWagAA0RwP/jmSlPbxlV7NFH3eal1h\n7UeGmDrj6xEcZoBmyYbiLL+oJU8rtON4gY06qzhTFvfNJEVc7Hpz8Q/7VzMI\nndOcbNQts6yr4RvI2E4JZaRGi5qE/HeVPj/j6FkUFwgwSoXx2IsPDSxRJ6wT\njLtiCiUAdeJ2ooVOm0QX2vrCL2BkzSW5jU+mg4T567TdRJJcdQyB+BR6Nej/\nkokLT8wjaN+aKxAzGiEe/GW8KjHC9bSSmW5PWif8rAL5qvkw20fmgv8DHv26\nYWfqr2A3+AzfTxAVm1d+r7io4V7l6gN7XPt6ZNiuYT+IaBMrGDDHUSFBwGAW\nGHjBy/uAFwwwHrLgbLCGvjKt/Cqi0+UKU4GVGyrrBDdkbDOn7ayLtgNBKNPV\nCN9uL7ksPWs8Ag8ZqLBhJIIi6nUrUn5uLVqN85NAqMKqiK2b3NAsv3b6fbYt\n3DXXLS4EaXRkS2PI37+uFQlQr+jiKmS+MFzW7Y3InIylLT9ps8Ooc/eEbwpw\nPwp9eaVVq849Y9xmMVcO8IdtPf4vyhF3NXBeFuSRsZoifxW0lghb84QhiE+L\n83t4+XNzK6c2w0gua11buFoHNScECSl6juHcAi7JYRykOJrfHLjNFl3E2yiO\nWE1VR/DLHrssuYhe/yRocONWBMdE9pwfeMeFpLvdF/9aAnfNtd8E6ttRhy6J\nTOV+\r\n=N24q\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQC97QDM+cfoCdYp//eiDknM7pnCoHluRs6XQEtmusOYEgIgPN5qzCykbKsYqwCFUPS6Tc0rvepPMf1y9QawmfXo2k4="
    }
  ]
}

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:cb6f738071b83fc7663bb138417cd6baffc9a76348ebadece079fd5c4f33ae45

Other collected versions

1.0.916 Apr1.0.816 Apr1.0.716 Apr1.0.629 Sept1.0.510 Mar1.0.49 JunView all collected versions →