Huge News!Announcing our $40M Series B led by Abstract Ventures.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 2.3.5 to 2.3.6

29

lib/utils.js

@@ -578,11 +578,2 @@ "use strict";

exports.doesHorizontalWallBlockPlayer = doesHorizontalWallBlockPlayer;
var numberToLetter = function (num) {
return String.fromCharCode(96 + num);
};
var decrementLetter = function (letter) {
return numberToLetter(letterToNumber(letter) - 1);
};
var incrementLetter = function (letter) {
return numberToLetter(letterToNumber(letter) + 1);
};
var verticallyIncrementPawnPosition = function (position) {

@@ -676,2 +667,22 @@ return consts_1.verticallyIncrementedPawnPositions[position];

var currentPosition = game.playerPositions[(0, getTurn_1.getTurn)(game)].position;
var unvalidatedPawnMoveArray = [
getPositionFromNorthMove(currentPosition),
getPositionFromEastMove(currentPosition),
getPositionFromWestMove(currentPosition),
getPositionFromSouthMove(currentPosition),
];
// This can be extended to also check if the players are next to each other
var includeMovesOverOpponent = game.pastMoves.length >= 7;
if (includeMovesOverOpponent) {
unvalidatedPawnMoveArray.concat([
getPositionFromNorthNorthMove(currentPosition),
getPositionFromNorthEastMove(currentPosition),
getPositionFromNorthWestMove(currentPosition),
getPositionFromEastEastMove(currentPosition),
getPositionFromWestWestMove(currentPosition),
getPositionFromSouthEastMove(currentPosition),
getPositionFromSouthWestMove(currentPosition),
getPositionFromSouthSouthMove(currentPosition),
]);
}
var validPawnMoveArray = [

@@ -678,0 +689,0 @@ getPositionFromNorthMove(currentPosition),

{
"name": "quoridor",
"version": "2.3.5",
"version": "2.3.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