Comparing version 1.7.4 to 1.7.5
@@ -1266,2 +1266,9 @@ "use strict"; | ||
}; | ||
var doesWallMoveHaveSameDirectionAsAllPreviousWallMoves = function (game, wallMove) { | ||
var pastWallMoves = game.pastMoves.filter(exports.isWallPosition); | ||
var orientation = exports.getWallOrientation(wallMove); | ||
return orientation === 'h' | ||
? pastWallMoves.every(isHorizontalWallMove) | ||
: pastWallMoves.every(isVerticalWallMove); | ||
}; | ||
var isHorizontalWallPosition = function (horizontalPosition) { | ||
@@ -1519,2 +1526,5 @@ switch (horizontalPosition) { | ||
} | ||
if (doesWallMoveHaveSameDirectionAsAllPreviousWallMoves(game, wallMove)) { | ||
return true; | ||
} | ||
if (!doesWallHaveAtLeastTwoNeighborWalls(game, wallMove)) { | ||
@@ -1521,0 +1531,0 @@ return true; |
{ | ||
"name": "quoridor", | ||
"version": "1.7.4", | ||
"version": "1.7.5", | ||
"description": "A JavaScipt Quoridor library for move validation etc.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148706
3496