Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

busca-palabras

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

busca-palabras - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "busca-palabras",
"version": "1.0.3",
"version": "1.0.4",
"main": "./src/buscapalabrasengine.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -27,3 +27,4 @@ class BuscaPalabrasEngine {

}
log(`\nsolucion:\n ${JSON.stringify(this.solucion)}`);
log(`\nsolucion:\n`);
log(this.solucion);
}

@@ -48,3 +49,3 @@

// smallest square that will enclose them
let deLetras = Math.ceil(Math.sqrt(sumaDeLetras*1.8));
let deLetras = Math.ceil(Math.sqrt(sumaDeLetras*1.2));
return Math.max(palabraMasLarga,deLetras,dimensionesSolicitadas||0);

@@ -133,2 +134,4 @@ }

rc += (avance.y>0?2:0);
rc += (avance.x>0&&avance.y===0?1:0);
rc += (avance.y>0&&avance.x===0?1:0);
let match = this.verificaLetras(palabraArray,posicion,avance);

@@ -135,0 +138,0 @@ if (match>0){

@@ -81,3 +81,3 @@ let assert = require('assert');

let rc = BuscaPalabrasEngine.calcularDimensionesOptimas(palabras);
assert.strictEqual(rc,10);
assert.strictEqual(rc,9);
});

@@ -87,3 +87,3 @@

let rc = BuscaPalabrasEngine.calcularDimensionesOptimas(palabrasCortas);
assert.strictEqual(rc,5);
assert.strictEqual(rc,4);
});

@@ -208,4 +208,4 @@

it ('prueba el output',()=>{
let cuadrado = new BuscaPalabrasEngine(['uno','dos']);
it.only ('prueba el output',()=>{
let cuadrado = new BuscaPalabrasEngine(['uno','dos'],4);
cuadrado.genera();

@@ -217,3 +217,4 @@ let result = '';

assert.strictEqual(result.includes('solucion:'),true);
cuadrado.output();
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc