Catalog npm
Back to packageRELEASE DETAILS

1.0.0

npm

2048game

The original 2048 game 100% functional

2048gameseyron
Published24 Aug 2020
Direct dependencies0
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 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-twg2h5qoFTV59nDX7RDqcZP6+H5No9YDmlrxRq7TwvEorqsreKayAfI3w8T5+jDD4W0Sv04Qpedv+r2UzvAiIA==",
  "shasum": "1ab595b1536153097f2a67ce03cb33d667bc1391",
  "tarball": "https://registry.npmjs.org/2048game/-/2048game-1.0.0.tgz",
  "fileCount": 4,
  "unpackedSize": 5728,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRDDECRA9TVsSAnZWagAAzeMQAIsqNHgm9Poi5nT3PnGt\nV2bwm5P3VKVk+2O58xirNsDkW/fAzzjOesRPpdvSMOKR5mS9rUAauEv40sgR\nBCIw2LVHo4P8VqJMQoP9kR3zULkdglGnrP1vzcVwqvHhn3XSZlccTkeadc/f\nukG6yXGiyu3APCAAXJOpOEsU8AFkdYr+rpbIEvihIomHeV/Rgz498TJwjrOn\n41d+X4qtA5xTHDJV+o6q/yghtSDAmuxmaSQzsYQ54kE7WfW5NHw0AYqKBweP\nYIU++s6utuUMXWk94TkSWucK7U5zx/wqpveDVM1+vklWmi/cOGhZuv2HTvtz\nYQoLIvKsk0awrHet137nSvSQ1ocUwCxG4SJW4+ahFIWFioY1jgmTeVZTWU/W\n/Ss4Cx8JLeE9o4nU8GWEUe4RXQND3TKgWH54oSojX6qpf87YbZF4NjyY7hw/\n19mFzvFtQHz2/eHdEiem+oHfbuVoqA3Y/EMgkAGflGxvUt2upEieRO5JWIrW\nDTW4kREMmK+6114RS6qprVVEZR1bjU2rIsj8GjOJcTvVpF68xfyZbhg14pdS\nMeBjpIMdtRKoaM0xL+VBoCgMZCdGgAtpgtB2yjtS40KQXlRPXiCGnRF1v9G4\nA7FjtxR0AC8V0cSs30dKnlz+E/SUJC/jhuzdfvohb8Xj0uqIW07rrbDuxYrs\nH0gt\r\n=rOZa\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQDynmSuPypzVkniBQItPgsSn4eoJlaCHpvxdvj3EPKcywIhALg4m0By1yNgTVySFfFg7dwhmaUJDMXizR/MlEcRSf7N"
    }
  ]
}

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:92d727dbb6b60a726c6eefdee52d61dadf2ea1328c3af10758b9bf08f6293a1c

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 →