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.1.0 to 2.1.1

15

lib/aStar.js

@@ -8,8 +8,13 @@ "use strict";

return [
utils_1.getPositionFromNorthMove(position),
utils_1.getPositionFromEastMove(position),
utils_1.getPositionFromSouthMove(position),
utils_1.getPositionFromWestMove(position),
utils_1.isVerticallyIncrementablePawnPosition(position) &&
utils_1.verticallyIncrementPawnPosition(position),
utils_1.isHorizontallyIncrementablePawnPosition(position) &&
utils_1.horizontallyIncrementPawnPosition(position),
utils_1.isVerticallyDecrementablePawnPosition(position) &&
utils_1.verticallyDecrementPawnPosition(position),
utils_1.isHorizontallyDecrementablePawnPosition(position) &&
utils_1.horizontallyDecrementPawnPosition(position),
].filter(function (newPosition) {
return (utils_1.isValidNormalMove(game, position, newPosition) &&
return (newPosition &&
utils_1.isValidNormalMove(game, position, newPosition) &&
!discoveredPositions.has(newPosition) &&

@@ -16,0 +21,0 @@ !relaxedPositions.has(newPosition));

@@ -1,2 +0,2 @@

import { DecrementableHorizontalPiecePosition, DecrementableHorizontalWallPosition, DecrementableVerticalPiecePosition, DecrementableVerticalWallPosition, HorizontalPiecePosition, HorizontalWallPosition, IncrementableHorizontalPiecePosition, IncrementableHorizontalWallPosition, IncrementableVerticalPiecePosition, IncrementableVerticalWallPosition, PawnPosition, VerticalPiecePosition, VerticalWallPosition } from './types';
import { DecrementableHorizontalPiecePosition, DecrementableHorizontalWallPosition, DecrementableVerticalPiecePosition, DecrementableVerticalWallPosition, HorizontallyDecrementablePawnPosition, HorizontallyIncrementablePawnPosition, HorizontalPiecePosition, HorizontalWallPosition, IncrementableHorizontalPiecePosition, IncrementableHorizontalWallPosition, IncrementableVerticalPiecePosition, IncrementableVerticalWallPosition, PawnPosition, VerticallyDecrementablePawnPosition, VerticallyIncrementablePawnPosition, VerticalPiecePosition, VerticalWallPosition } from './types';
export declare const pawnPositions: PawnPosition[];

@@ -34,1 +34,337 @@ /**

export declare const isDecrementableVerticalPiecePositionMap: Record<VerticalPiecePosition | VerticalWallPosition, boolean>;
export declare const verticallyIncrementedPawnPositions: Record<VerticallyIncrementablePawnPosition, PawnPosition>;
export declare const isVerticallyIncrementablePawnPositionMap: {
a1: boolean;
a2: boolean;
a3: boolean;
a4: boolean;
a5: boolean;
a6: boolean;
a7: boolean;
a8: boolean;
a9: boolean;
b1: boolean;
b2: boolean;
b3: boolean;
b4: boolean;
b5: boolean;
b6: boolean;
b7: boolean;
b8: boolean;
b9: boolean;
c1: boolean;
c2: boolean;
c3: boolean;
c4: boolean;
c5: boolean;
c6: boolean;
c7: boolean;
c8: boolean;
c9: boolean;
d1: boolean;
d2: boolean;
d3: boolean;
d4: boolean;
d5: boolean;
d6: boolean;
d7: boolean;
d8: boolean;
d9: boolean;
e1: boolean;
e2: boolean;
e3: boolean;
e4: boolean;
e5: boolean;
e6: boolean;
e7: boolean;
e8: boolean;
e9: boolean;
f1: boolean;
f2: boolean;
f3: boolean;
f4: boolean;
f5: boolean;
f6: boolean;
f7: boolean;
f8: boolean;
f9: boolean;
g1: boolean;
g2: boolean;
g3: boolean;
g4: boolean;
g5: boolean;
g6: boolean;
g7: boolean;
g8: boolean;
g9: boolean;
h1: boolean;
h2: boolean;
h3: boolean;
h4: boolean;
h5: boolean;
h6: boolean;
h7: boolean;
h8: boolean;
h9: boolean;
i1: boolean;
i2: boolean;
i3: boolean;
i4: boolean;
i5: boolean;
i6: boolean;
i7: boolean;
i8: boolean;
i9: boolean;
};
export declare const verticallyDecrementedPawnPositions: Record<VerticallyDecrementablePawnPosition, PawnPosition>;
export declare const isVerticallyDecrementablePawnPositionMap: {
a1: boolean;
a2: boolean;
a3: boolean;
a4: boolean;
a5: boolean;
a6: boolean;
a7: boolean;
a8: boolean;
a9: boolean;
b1: boolean;
b2: boolean;
b3: boolean;
b4: boolean;
b5: boolean;
b6: boolean;
b7: boolean;
b8: boolean;
b9: boolean;
c1: boolean;
c2: boolean;
c3: boolean;
c4: boolean;
c5: boolean;
c6: boolean;
c7: boolean;
c8: boolean;
c9: boolean;
d1: boolean;
d2: boolean;
d3: boolean;
d4: boolean;
d5: boolean;
d6: boolean;
d7: boolean;
d8: boolean;
d9: boolean;
e1: boolean;
e2: boolean;
e3: boolean;
e4: boolean;
e5: boolean;
e6: boolean;
e7: boolean;
e8: boolean;
e9: boolean;
f1: boolean;
f2: boolean;
f3: boolean;
f4: boolean;
f5: boolean;
f6: boolean;
f7: boolean;
f8: boolean;
f9: boolean;
g1: boolean;
g2: boolean;
g3: boolean;
g4: boolean;
g5: boolean;
g6: boolean;
g7: boolean;
g8: boolean;
g9: boolean;
h1: boolean;
h2: boolean;
h3: boolean;
h4: boolean;
h5: boolean;
h6: boolean;
h7: boolean;
h8: boolean;
h9: boolean;
i1: boolean;
i2: boolean;
i3: boolean;
i4: boolean;
i5: boolean;
i6: boolean;
i7: boolean;
i8: boolean;
i9: boolean;
};
export declare const horizontallyIncrementedPawnPositions: Record<HorizontallyIncrementablePawnPosition, PawnPosition>;
export declare const isHorizontallyIncrementablePawnPositionMap: {
a1: boolean;
a2: boolean;
a3: boolean;
a4: boolean;
a5: boolean;
a6: boolean;
a7: boolean;
a8: boolean;
a9: boolean;
b1: boolean;
b2: boolean;
b3: boolean;
b4: boolean;
b5: boolean;
b6: boolean;
b7: boolean;
b8: boolean;
b9: boolean;
c1: boolean;
c2: boolean;
c3: boolean;
c4: boolean;
c5: boolean;
c6: boolean;
c7: boolean;
c8: boolean;
c9: boolean;
d1: boolean;
d2: boolean;
d3: boolean;
d4: boolean;
d5: boolean;
d6: boolean;
d7: boolean;
d8: boolean;
d9: boolean;
e1: boolean;
e2: boolean;
e3: boolean;
e4: boolean;
e5: boolean;
e6: boolean;
e7: boolean;
e8: boolean;
e9: boolean;
f1: boolean;
f2: boolean;
f3: boolean;
f4: boolean;
f5: boolean;
f6: boolean;
f7: boolean;
f8: boolean;
f9: boolean;
g1: boolean;
g2: boolean;
g3: boolean;
g4: boolean;
g5: boolean;
g6: boolean;
g7: boolean;
g8: boolean;
g9: boolean;
h1: boolean;
h2: boolean;
h3: boolean;
h4: boolean;
h5: boolean;
h6: boolean;
h7: boolean;
h8: boolean;
h9: boolean;
i1: boolean;
i2: boolean;
i3: boolean;
i4: boolean;
i5: boolean;
i6: boolean;
i7: boolean;
i8: boolean;
i9: boolean;
};
export declare const horizontallyDecrementedPawnPositions: Record<HorizontallyDecrementablePawnPosition, PawnPosition>;
export declare const isHorizontallyDecrementablePawnPositionMap: {
a1: boolean;
a2: boolean;
a3: boolean;
a4: boolean;
a5: boolean;
a6: boolean;
a7: boolean;
a8: boolean;
a9: boolean;
b1: boolean;
b2: boolean;
b3: boolean;
b4: boolean;
b5: boolean;
b6: boolean;
b7: boolean;
b8: boolean;
b9: boolean;
c1: boolean;
c2: boolean;
c3: boolean;
c4: boolean;
c5: boolean;
c6: boolean;
c7: boolean;
c8: boolean;
c9: boolean;
d1: boolean;
d2: boolean;
d3: boolean;
d4: boolean;
d5: boolean;
d6: boolean;
d7: boolean;
d8: boolean;
d9: boolean;
e1: boolean;
e2: boolean;
e3: boolean;
e4: boolean;
e5: boolean;
e6: boolean;
e7: boolean;
e8: boolean;
e9: boolean;
f1: boolean;
f2: boolean;
f3: boolean;
f4: boolean;
f5: boolean;
f6: boolean;
f7: boolean;
f8: boolean;
f9: boolean;
g1: boolean;
g2: boolean;
g3: boolean;
g4: boolean;
g5: boolean;
g6: boolean;
g7: boolean;
g8: boolean;
g9: boolean;
h1: boolean;
h2: boolean;
h3: boolean;
h4: boolean;
h5: boolean;
h6: boolean;
h7: boolean;
h8: boolean;
h9: boolean;
i1: boolean;
i2: boolean;
i3: boolean;
i4: boolean;
i5: boolean;
i6: boolean;
i7: boolean;
i8: boolean;
i9: boolean;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDecrementableVerticalPiecePositionMap = exports.isIncrementableVerticalPiecePositionMap = exports.isDecrementableHorizontalPiecePositionMap = exports.isIncrementableHorizontalPiecePositionMap = exports.isDecrementableVerticalWallPositionMap = exports.isIncrementableVerticalWallPositionMap = exports.isDecrementableHorizontalWallPositionMap = exports.isIncrementableHorizontalWallPositionMap = exports.isVerticalWallCoordinateMap = exports.isHorizontalWallCoordinateMap = exports.incrementedHorizontalPiecePositions = exports.incrementedVerticalPiecePositions = exports.decrementedVerticalPiecePositions = exports.decrementedHorizontalPiecePositions = exports.incrementedVerticalWallPositions = exports.decrementedVerticalWallPositions = exports.incrementedHorizontalWallPositions = exports.decrementedHorizontalWallPositions = exports.verticalPiecePositions = exports.verticallyDecrementableWallPositions = exports.verticallyIncrementableWallPositions = exports.horizontallyDecrementableWallPositions = exports.horizontallyIncrementableWallPositions = exports.possiblyTrappedPositions = exports.pawnPositions = void 0;
exports.isHorizontallyDecrementablePawnPositionMap = exports.horizontallyDecrementedPawnPositions = exports.isHorizontallyIncrementablePawnPositionMap = exports.horizontallyIncrementedPawnPositions = exports.isVerticallyDecrementablePawnPositionMap = exports.verticallyDecrementedPawnPositions = exports.isVerticallyIncrementablePawnPositionMap = exports.verticallyIncrementedPawnPositions = exports.isDecrementableVerticalPiecePositionMap = exports.isIncrementableVerticalPiecePositionMap = exports.isDecrementableHorizontalPiecePositionMap = exports.isIncrementableHorizontalPiecePositionMap = exports.isDecrementableVerticalWallPositionMap = exports.isIncrementableVerticalWallPositionMap = exports.isDecrementableHorizontalWallPositionMap = exports.isIncrementableHorizontalWallPositionMap = exports.isVerticalWallCoordinateMap = exports.isHorizontalWallCoordinateMap = exports.incrementedHorizontalPiecePositions = exports.incrementedVerticalPiecePositions = exports.decrementedVerticalPiecePositions = exports.decrementedHorizontalPiecePositions = exports.incrementedVerticalWallPositions = exports.decrementedVerticalWallPositions = exports.incrementedHorizontalWallPositions = exports.decrementedHorizontalWallPositions = exports.verticalPiecePositions = exports.verticallyDecrementableWallPositions = exports.verticallyIncrementableWallPositions = exports.horizontallyDecrementableWallPositions = exports.horizontallyIncrementableWallPositions = exports.possiblyTrappedPositions = exports.pawnPositions = void 0;
exports.pawnPositions = [

@@ -812,1 +812,629 @@ 'a1',

};
exports.verticallyIncrementedPawnPositions = {
a1: 'a2',
a2: 'a3',
a3: 'a4',
a4: 'a5',
a5: 'a6',
a6: 'a7',
a7: 'a8',
a8: 'a9',
b1: 'b2',
b2: 'b3',
b3: 'b4',
b4: 'b5',
b5: 'b6',
b6: 'b7',
b7: 'b8',
b8: 'b9',
c1: 'c2',
c2: 'c3',
c3: 'c4',
c4: 'c5',
c5: 'c6',
c6: 'c7',
c7: 'c8',
c8: 'c9',
d1: 'd2',
d2: 'd3',
d3: 'd4',
d4: 'd5',
d5: 'd6',
d6: 'd7',
d7: 'd8',
d8: 'd9',
e1: 'e2',
e2: 'e3',
e3: 'e4',
e4: 'e5',
e5: 'e6',
e6: 'e7',
e7: 'e8',
e8: 'e9',
f1: 'f2',
f2: 'f3',
f3: 'f4',
f4: 'f5',
f5: 'f6',
f6: 'f7',
f7: 'f8',
f8: 'f9',
g1: 'g2',
g2: 'g3',
g3: 'g4',
g4: 'g5',
g5: 'g6',
g6: 'g7',
g7: 'g8',
g8: 'g9',
h1: 'h2',
h2: 'h3',
h3: 'h4',
h4: 'h5',
h5: 'h6',
h6: 'h7',
h7: 'h8',
h8: 'h9',
i1: 'i2',
i2: 'i3',
i3: 'i4',
i4: 'i5',
i5: 'i6',
i6: 'i7',
i7: 'i8',
i8: 'i9',
};
exports.isVerticallyIncrementablePawnPositionMap = {
a1: true,
a2: true,
a3: true,
a4: true,
a5: true,
a6: true,
a7: true,
a8: true,
a9: false,
b1: true,
b2: true,
b3: true,
b4: true,
b5: true,
b6: true,
b7: true,
b8: true,
b9: false,
c1: true,
c2: true,
c3: true,
c4: true,
c5: true,
c6: true,
c7: true,
c8: true,
c9: false,
d1: true,
d2: true,
d3: true,
d4: true,
d5: true,
d6: true,
d7: true,
d8: true,
d9: false,
e1: true,
e2: true,
e3: true,
e4: true,
e5: true,
e6: true,
e7: true,
e8: true,
e9: false,
f1: true,
f2: true,
f3: true,
f4: true,
f5: true,
f6: true,
f7: true,
f8: true,
f9: false,
g1: true,
g2: true,
g3: true,
g4: true,
g5: true,
g6: true,
g7: true,
g8: true,
g9: false,
h1: true,
h2: true,
h3: true,
h4: true,
h5: true,
h6: true,
h7: true,
h8: true,
h9: false,
i1: true,
i2: true,
i3: true,
i4: true,
i5: true,
i6: true,
i7: true,
i8: true,
i9: false,
};
exports.verticallyDecrementedPawnPositions = {
a2: 'a1',
a3: 'a2',
a4: 'a3',
a5: 'a4',
a6: 'a5',
a7: 'a6',
a8: 'a7',
a9: 'a8',
b2: 'b1',
b3: 'b2',
b4: 'b3',
b5: 'b4',
b6: 'b5',
b7: 'b6',
b8: 'b7',
b9: 'b8',
c2: 'c1',
c3: 'c2',
c4: 'c3',
c5: 'c4',
c6: 'c5',
c7: 'c6',
c8: 'c7',
c9: 'c8',
d2: 'd1',
d3: 'd2',
d4: 'd3',
d5: 'd4',
d6: 'd5',
d7: 'd6',
d8: 'd7',
d9: 'd8',
e2: 'e1',
e3: 'e2',
e4: 'e3',
e5: 'e4',
e6: 'e5',
e7: 'e6',
e8: 'e7',
e9: 'e8',
f2: 'f1',
f3: 'f2',
f4: 'f3',
f5: 'f4',
f6: 'f5',
f7: 'f6',
f8: 'f7',
f9: 'f8',
g2: 'g1',
g3: 'g2',
g4: 'g3',
g5: 'g4',
g6: 'g5',
g7: 'g6',
g8: 'g7',
g9: 'g8',
h2: 'h1',
h3: 'h2',
h4: 'h3',
h5: 'h4',
h6: 'h5',
h7: 'h6',
h8: 'h7',
h9: 'h8',
i2: 'i1',
i3: 'i2',
i4: 'i3',
i5: 'i4',
i6: 'i5',
i7: 'i6',
i8: 'i7',
i9: 'i8',
};
exports.isVerticallyDecrementablePawnPositionMap = {
a1: false,
a2: true,
a3: true,
a4: true,
a5: true,
a6: true,
a7: true,
a8: true,
a9: true,
b1: false,
b2: true,
b3: true,
b4: true,
b5: true,
b6: true,
b7: true,
b8: true,
b9: true,
c1: false,
c2: true,
c3: true,
c4: true,
c5: true,
c6: true,
c7: true,
c8: true,
c9: true,
d1: false,
d2: true,
d3: true,
d4: true,
d5: true,
d6: true,
d7: true,
d8: true,
d9: true,
e1: false,
e2: true,
e3: true,
e4: true,
e5: true,
e6: true,
e7: true,
e8: true,
e9: true,
f1: false,
f2: true,
f3: true,
f4: true,
f5: true,
f6: true,
f7: true,
f8: true,
f9: true,
g1: false,
g2: true,
g3: true,
g4: true,
g5: true,
g6: true,
g7: true,
g8: true,
g9: true,
h1: false,
h2: true,
h3: true,
h4: true,
h5: true,
h6: true,
h7: true,
h8: true,
h9: true,
i1: false,
i2: true,
i3: true,
i4: true,
i5: true,
i6: true,
i7: true,
i8: true,
i9: true,
};
exports.horizontallyIncrementedPawnPositions = {
a1: 'b1',
a2: 'b2',
a3: 'b3',
a4: 'b4',
a5: 'b5',
a6: 'b6',
a7: 'b7',
a8: 'b8',
a9: 'b9',
b1: 'c1',
b2: 'c2',
b3: 'c3',
b4: 'c4',
b5: 'c5',
b6: 'c6',
b7: 'c7',
b8: 'c8',
b9: 'c9',
c1: 'd1',
c2: 'd2',
c3: 'd3',
c4: 'd4',
c5: 'd5',
c6: 'd6',
c7: 'd7',
c8: 'd8',
c9: 'd9',
d1: 'e1',
d2: 'e2',
d3: 'e3',
d4: 'e4',
d5: 'e5',
d6: 'e6',
d7: 'e7',
d8: 'e8',
d9: 'e9',
e1: 'f1',
e2: 'f2',
e3: 'f3',
e4: 'f4',
e5: 'f5',
e6: 'f6',
e7: 'f7',
e8: 'f8',
e9: 'f9',
f1: 'g1',
f2: 'g2',
f3: 'g3',
f4: 'g4',
f5: 'g5',
f6: 'g6',
f7: 'g7',
f8: 'g8',
f9: 'g9',
g1: 'h1',
g2: 'h2',
g3: 'h3',
g4: 'h4',
g5: 'h5',
g6: 'h6',
g7: 'h7',
g8: 'h8',
g9: 'h9',
h1: 'i1',
h2: 'i2',
h3: 'i3',
h4: 'i4',
h5: 'i5',
h6: 'i6',
h7: 'i7',
h8: 'i8',
h9: 'i9',
};
exports.isHorizontallyIncrementablePawnPositionMap = {
a1: true,
a2: true,
a3: true,
a4: true,
a5: true,
a6: true,
a7: true,
a8: true,
a9: true,
b1: true,
b2: true,
b3: true,
b4: true,
b5: true,
b6: true,
b7: true,
b8: true,
b9: true,
c1: true,
c2: true,
c3: true,
c4: true,
c5: true,
c6: true,
c7: true,
c8: true,
c9: true,
d1: true,
d2: true,
d3: true,
d4: true,
d5: true,
d6: true,
d7: true,
d8: true,
d9: true,
e1: true,
e2: true,
e3: true,
e4: true,
e5: true,
e6: true,
e7: true,
e8: true,
e9: true,
f1: true,
f2: true,
f3: true,
f4: true,
f5: true,
f6: true,
f7: true,
f8: true,
f9: true,
g1: true,
g2: true,
g3: true,
g4: true,
g5: true,
g6: true,
g7: true,
g8: true,
g9: true,
h1: true,
h2: true,
h3: true,
h4: true,
h5: true,
h6: true,
h7: true,
h8: true,
h9: true,
i1: false,
i2: false,
i3: false,
i4: false,
i5: false,
i6: false,
i7: false,
i8: false,
i9: false,
};
exports.horizontallyDecrementedPawnPositions = {
b1: 'a1',
b2: 'a2',
b3: 'a3',
b4: 'a4',
b5: 'a5',
b6: 'a6',
b7: 'a7',
b8: 'a8',
b9: 'a9',
c1: 'b1',
c2: 'b2',
c3: 'b3',
c4: 'b4',
c5: 'b5',
c6: 'b6',
c7: 'b7',
c8: 'b8',
c9: 'b9',
d1: 'c1',
d2: 'c2',
d3: 'c3',
d4: 'c4',
d5: 'c5',
d6: 'c6',
d7: 'c7',
d8: 'c8',
d9: 'c9',
e1: 'd1',
e2: 'd2',
e3: 'd3',
e4: 'd4',
e5: 'd5',
e6: 'd6',
e7: 'd7',
e8: 'd8',
e9: 'd9',
f1: 'e1',
f2: 'e2',
f3: 'e3',
f4: 'e4',
f5: 'e5',
f6: 'e6',
f7: 'e7',
f8: 'e8',
f9: 'e9',
g1: 'f1',
g2: 'f2',
g3: 'f3',
g4: 'f4',
g5: 'f5',
g6: 'f6',
g7: 'f7',
g8: 'f8',
g9: 'f9',
h1: 'g1',
h2: 'g2',
h3: 'g3',
h4: 'g4',
h5: 'g5',
h6: 'g6',
h7: 'g7',
h8: 'g8',
h9: 'g9',
i1: 'h1',
i2: 'h2',
i3: 'h3',
i4: 'h4',
i5: 'h5',
i6: 'h6',
i7: 'h7',
i8: 'h8',
i9: 'h9',
};
exports.isHorizontallyDecrementablePawnPositionMap = {
a1: false,
a2: false,
a3: false,
a4: false,
a5: false,
a6: false,
a7: false,
a8: false,
a9: false,
b1: true,
b2: true,
b3: true,
b4: true,
b5: true,
b6: true,
b7: true,
b8: true,
b9: true,
c1: true,
c2: true,
c3: true,
c4: true,
c5: true,
c6: true,
c7: true,
c8: true,
c9: true,
d1: true,
d2: true,
d3: true,
d4: true,
d5: true,
d6: true,
d7: true,
d8: true,
d9: true,
e1: true,
e2: true,
e3: true,
e4: true,
e5: true,
e6: true,
e7: true,
e8: true,
e9: true,
f1: true,
f2: true,
f3: true,
f4: true,
f5: true,
f6: true,
f7: true,
f8: true,
f9: true,
g1: true,
g2: true,
g3: true,
g4: true,
g5: true,
g6: true,
g7: true,
g8: true,
g9: true,
h1: true,
h2: true,
h3: true,
h4: true,
h5: true,
h6: true,
h7: true,
h8: true,
h9: true,
i1: true,
i2: true,
i3: true,
i4: true,
i5: true,
i6: true,
i7: true,
i8: true,
i9: true,
};
import { Game } from './types';
export declare const getValidMoveArray: (game: Game) => (import("./types").PawnPosition | import("./types").WallPosition)[];
export declare const getValidMoveArray: (game: Game) => (false | import("./types").PawnPosition | import("./types").WallPosition)[];

@@ -18,2 +18,6 @@ export declare type HorizontalPiecePosition = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i';

export declare type PawnPosition = 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6' | 'a7' | 'a8' | 'a9' | 'b1' | 'b2' | 'b3' | 'b4' | 'b5' | 'b6' | 'b7' | 'b8' | 'b9' | 'c1' | 'c2' | 'c3' | 'c4' | 'c5' | 'c6' | 'c7' | 'c8' | 'c9' | 'd1' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'd9' | 'e1' | 'e2' | 'e3' | 'e4' | 'e5' | 'e6' | 'e7' | 'e8' | 'e9' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'g1' | 'g2' | 'g3' | 'g4' | 'g5' | 'g6' | 'g7' | 'g8' | 'g9' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'h9' | 'i1' | 'i2' | 'i3' | 'i4' | 'i5' | 'i6' | 'i7' | 'i8' | 'i9';
export declare type VerticallyIncrementablePawnPosition = 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6' | 'a7' | 'a8' | 'b1' | 'b2' | 'b3' | 'b4' | 'b5' | 'b6' | 'b7' | 'b8' | 'c1' | 'c2' | 'c3' | 'c4' | 'c5' | 'c6' | 'c7' | 'c8' | 'd1' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'e1' | 'e2' | 'e3' | 'e4' | 'e5' | 'e6' | 'e7' | 'e8' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'g1' | 'g2' | 'g3' | 'g4' | 'g5' | 'g6' | 'g7' | 'g8' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'i1' | 'i2' | 'i3' | 'i4' | 'i5' | 'i6' | 'i7' | 'i8';
export declare type VerticallyDecrementablePawnPosition = 'a2' | 'a3' | 'a4' | 'a5' | 'a6' | 'a7' | 'a8' | 'a9' | 'b2' | 'b3' | 'b4' | 'b5' | 'b6' | 'b7' | 'b8' | 'b9' | 'c2' | 'c3' | 'c4' | 'c5' | 'c6' | 'c7' | 'c8' | 'c9' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'd9' | 'e2' | 'e3' | 'e4' | 'e5' | 'e6' | 'e7' | 'e8' | 'e9' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'g2' | 'g3' | 'g4' | 'g5' | 'g6' | 'g7' | 'g8' | 'g9' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'h9' | 'i2' | 'i3' | 'i4' | 'i5' | 'i6' | 'i7' | 'i8' | 'i9';
export declare type HorizontallyIncrementablePawnPosition = 'a1' | 'a2' | 'a3' | 'a4' | 'a5' | 'a6' | 'a7' | 'a8' | 'a9' | 'b1' | 'b2' | 'b3' | 'b4' | 'b5' | 'b6' | 'b7' | 'b8' | 'b9' | 'c1' | 'c2' | 'c3' | 'c4' | 'c5' | 'c6' | 'c7' | 'c8' | 'c9' | 'd1' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'd9' | 'e1' | 'e2' | 'e3' | 'e4' | 'e5' | 'e6' | 'e7' | 'e8' | 'e9' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'g1' | 'g2' | 'g3' | 'g4' | 'g5' | 'g6' | 'g7' | 'g8' | 'g9' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'h9';
export declare type HorizontallyDecrementablePawnPosition = 'b1' | 'b2' | 'b3' | 'b4' | 'b5' | 'b6' | 'b7' | 'b8' | 'b9' | 'c1' | 'c2' | 'c3' | 'c4' | 'c5' | 'c6' | 'c7' | 'c8' | 'c9' | 'd1' | 'd2' | 'd3' | 'd4' | 'd5' | 'd6' | 'd7' | 'd8' | 'd9' | 'e1' | 'e2' | 'e3' | 'e4' | 'e5' | 'e6' | 'e7' | 'e8' | 'e9' | 'f1' | 'f2' | 'f3' | 'f4' | 'f5' | 'f6' | 'f7' | 'f8' | 'f9' | 'g1' | 'g2' | 'g3' | 'g4' | 'g5' | 'g6' | 'g7' | 'g8' | 'g9' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h7' | 'h8' | 'h9' | 'i1' | 'i2' | 'i3' | 'i4' | 'i5' | 'i6' | 'i7' | 'i8' | 'i9';
export declare type PawnMove = PawnPosition;

@@ -20,0 +24,0 @@ export declare type WallPosition = 'a1h' | 'a1v' | 'a2h' | 'a2v' | 'a3h' | 'a3v' | 'a4h' | 'a4v' | 'a5h' | 'a5v' | 'a6h' | 'a6v' | 'a7h' | 'a7v' | 'a8h' | 'a8v' | 'b1h' | 'b1v' | 'b2h' | 'b2v' | 'b3h' | 'b3v' | 'b4h' | 'b4v' | 'b5h' | 'b5v' | 'b6h' | 'b6v' | 'b7h' | 'b7v' | 'b8h' | 'b8v' | 'c1h' | 'c1v' | 'c2h' | 'c2v' | 'c3h' | 'c3v' | 'c4h' | 'c4v' | 'c5h' | 'c5v' | 'c6h' | 'c6v' | 'c7h' | 'c7v' | 'c8h' | 'c8v' | 'd1h' | 'd1v' | 'd2h' | 'd2v' | 'd3h' | 'd3v' | 'd4h' | 'd4v' | 'd5h' | 'd5v' | 'd6h' | 'd6v' | 'd7h' | 'd7v' | 'd8h' | 'd8v' | 'e1h' | 'e1v' | 'e2h' | 'e2v' | 'e3h' | 'e3v' | 'e4h' | 'e4v' | 'e5h' | 'e5v' | 'e6h' | 'e6v' | 'e7h' | 'e7v' | 'e8h' | 'e8v' | 'f1h' | 'f1v' | 'f2h' | 'f2v' | 'f3h' | 'f3v' | 'f4h' | 'f4v' | 'f5h' | 'f5v' | 'f6h' | 'f6v' | 'f7h' | 'f7v' | 'f8h' | 'f8v' | 'g1h' | 'g1v' | 'g2h' | 'g2v' | 'g3h' | 'g3v' | 'g4h' | 'g4v' | 'g5h' | 'g5v' | 'g6h' | 'g6v' | 'g7h' | 'g7v' | 'g8h' | 'g8v' | 'h1h' | 'h1v' | 'h2h' | 'h2v' | 'h3h' | 'h3v' | 'h4h' | 'h4v' | 'h5h' | 'h5v' | 'h6h' | 'h6v' | 'h7h' | 'h7v' | 'h8h' | 'h8v';

@@ -1,2 +0,2 @@

import { Game, HorizontalPiecePosition, HorizontalWallPosition, Move, MoveObject, PawnMove, PawnPosition, Player, VerticalPiecePosition, VerticalWallPosition, WallMove, WallOrientation, WallPosition } from './types';
import { Game, HorizontallyDecrementablePawnPosition, HorizontallyIncrementablePawnPosition, HorizontalPiecePosition, HorizontalWallPosition, Move, MoveObject, PawnMove, PawnPosition, Player, VerticallyDecrementablePawnPosition, VerticallyIncrementablePawnPosition, VerticalPiecePosition, VerticalWallPosition, WallMove, WallOrientation, WallPosition } from './types';
declare type GetHorizontalCoordinate = {

@@ -22,7 +22,11 @@ (move: WallPosition): HorizontalWallPosition;

export declare const doesHorizontalWallBlockPlayer: (game: Game, player: Player, horizontalWall: WallPosition) => boolean;
export declare const getPositionFromNorthMove: (currentPosition: PawnPosition) => PawnPosition;
export declare const getPositionFromEastMove: (currentPosition: PawnPosition) => PawnPosition;
export declare const getPositionFromSouthMove: (currentPosition: PawnPosition) => PawnPosition;
export declare const getPositionFromWestMove: (currentPosition: PawnPosition) => PawnPosition;
export declare const getValidPawnMoveArray: (game: Game) => PawnPosition[];
export declare const verticallyIncrementPawnPosition: (position: VerticallyIncrementablePawnPosition) => PawnPosition;
export declare const isVerticallyIncrementablePawnPosition: (position: PawnPosition) => position is VerticallyIncrementablePawnPosition;
export declare const verticallyDecrementPawnPosition: (position: VerticallyDecrementablePawnPosition) => PawnPosition;
export declare const isVerticallyDecrementablePawnPosition: (position: PawnPosition) => position is VerticallyDecrementablePawnPosition;
export declare const horizontallyIncrementPawnPosition: (position: HorizontallyIncrementablePawnPosition) => PawnPosition;
export declare const isHorizontallyIncrementablePawnPosition: (position: PawnPosition) => position is HorizontallyIncrementablePawnPosition;
export declare const horizontallyDecrementPawnPosition: (position: HorizontallyDecrementablePawnPosition) => PawnPosition;
export declare const isHorizontallyDecrementablePawnPosition: (position: PawnPosition) => position is HorizontallyDecrementablePawnPosition;
export declare const getValidPawnMoveArray: (game: Game) => (false | PawnPosition)[];
export declare const getNumberOfNeighborWalls: (game: Game, wallMove: WallMove) => number;

@@ -29,0 +33,0 @@ export declare const isWallAdjacentToAtLeastOnePawn: (game: Game, wall: WallPosition) => boolean;

{
"name": "quoridor",
"version": "2.1.0",
"version": "2.1.1",
"description": "A JavaScipt Quoridor library for move validation etc.",

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

Sorry, the diff of this file is too big to display

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