New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

quoridor

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quoridor - npm Package Compare versions

Comparing version 1.6.5 to 1.6.6

69

lib/utils.js

@@ -503,2 +503,14 @@ "use strict";

};
var isOnRightmostRow = function (move) {
return exports.getHorizontalCoordinate(move) === 'i';
};
var isOnLeftmostRow = function (move) {
return exports.getHorizontalCoordinate(move) === 'a';
};
var isOnTopRow = function (move) {
return exports.getVerticalCoordinate(move) === 9;
};
var isOnBottomRow = function (move) {
return exports.getVerticalCoordinate(move) === 1;
};
var isValidNormalMove = function (game, currentPosition, move) {

@@ -542,4 +554,9 @@ var x = exports.getHorizontalCoordinate(currentPosition);

y: incrementVerticalPiecePosition(y),
})))
})) &&
!isOnTopRow(exports.moveObjectToMove({
x: x,
y: incrementVerticalPiecePosition(y),
}))) {
return false;
}
if (hasWallAbove(game, currentPosition))

@@ -561,2 +578,6 @@ return false;

y: incrementVerticalPiecePosition(y),
})) &&
!isOnTopRow(exports.moveObjectToMove({
x: x,
y: incrementVerticalPiecePosition(y),
})))

@@ -598,4 +619,9 @@ return false;

y: y,
})))
})) &&
!isOnRightmostRow(exports.moveObjectToMove({
x: incrementHorizontalPiecePosition(x),
y: y,
}))) {
return false;
}
if (hasWallToTheRight(game, currentPosition))

@@ -607,4 +633,5 @@ return false;

y: y,
})))
}))) {
return false;
}
return true;

@@ -618,2 +645,6 @@ }

y: y,
})) &&
!isOnRightmostRow(exports.moveObjectToMove({
x: incrementHorizontalPiecePosition(x),
y: y,
})))

@@ -656,4 +687,9 @@ return false;

y: decrementVerticalPiecePosition(y),
})))
})) &&
!isOnBottomRow(exports.moveObjectToMove({
x: x,
y: decrementVerticalPiecePosition(y),
}))) {
return false;
}
if (hasWallBelow(game, currentPosition))

@@ -665,4 +701,9 @@ return false;

y: decrementVerticalPiecePosition(y),
})))
})) &&
!isOnBottomRow(exports.moveObjectToMove({
x: x,
y: decrementVerticalPiecePosition(y),
}))) {
return false;
}
return true;

@@ -676,2 +717,6 @@ }

y: decrementVerticalPiecePosition(y),
})) &&
!isOnBottomRow(exports.moveObjectToMove({
x: x,
y: decrementVerticalPiecePosition(y),
})))

@@ -713,4 +758,9 @@ return false;

y: y,
})))
})) &&
!isOnLeftmostRow(exports.moveObjectToMove({
x: decrementHorizontalPiecePosition(x),
y: y,
}))) {
return false;
}
if (hasWallToTheLeft(game, currentPosition))

@@ -732,4 +782,9 @@ return false;

y: y,
})))
})) &&
!isOnLeftmostRow(exports.moveObjectToMove({
x: decrementHorizontalPiecePosition(x),
y: y,
}))) {
return false;
}
if (hasWallToTheLeft(game, currentPosition))

@@ -736,0 +791,0 @@ return false;

2

package.json
{
"name": "quoridor",
"version": "1.6.5",
"version": "1.6.6",
"description": "A JavaScipt Quoridor library for move validation etc.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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