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

onix-chess

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onix-chess - npm Package Compare versions

Comparing version 0.5.1 to 1.0.0

12

built/chess/Castle.js

@@ -9,11 +9,11 @@ "use strict";

}
// Queen side. Long castling.
Castle.QSide = 0;
Castle.Q = 'O-O-O';
// King side. Short castling.
Castle.KSide = 1;
Castle.K = 'O-O';
return Castle;
}());
// Queen side. Long castling.
Castle.QSide = 0;
Castle.Q = 'O-O-O';
// King side. Short castling.
Castle.KSide = 1;
Castle.K = 'O-O';
exports.Castle = Castle;
//# sourceMappingURL=Castle.js.map

@@ -188,3 +188,2 @@ "use strict";

});
// public get
Chess.prototype.clear = function () {

@@ -191,0 +190,0 @@ this.GameId = 0;

@@ -15,11 +15,11 @@ "use strict";

};
Color.White = WHITE;
Color.Black = BLACK;
Color.NoColor = NO_COLOR;
Color.WhiteChar = "w";
Color.BlackChar = "b";
Color.Names = ["white", "black", "none"];
return Color;
}());
Color.White = WHITE;
Color.Black = BLACK;
Color.NoColor = NO_COLOR;
Color.WhiteChar = "w";
Color.BlackChar = "b";
Color.Names = ["white", "black", "none"];
exports.Color = Color;
//# sourceMappingURL=Color.js.map

@@ -189,3 +189,3 @@ "use strict";

}
// вызов инициализации матрицы перемещений.
// Call initialization script.
(function () {

@@ -224,23 +224,23 @@ initializeDirections();

};
// None
Direction.Null = NULL_DIR;
// Up
Direction.Up = UP;
// Down
Direction.Down = DOWN;
// Left
Direction.Left = LEFT;
// Right
Direction.Right = RIGHT;
// Up/Left
Direction.UpLeft = UP_LEFT;
// Up/Right
Direction.UpRight = UP_RIGHT;
// Down/Left
Direction.DownLeft = DOWN_LEFT;
// Down/Right
Direction.DownRight = DOWN_RIGHT;
return Direction;
}());
// None
Direction.Null = NULL_DIR;
// Up
Direction.Up = UP;
// Down
Direction.Down = DOWN;
// Left
Direction.Left = LEFT;
// Right
Direction.Right = RIGHT;
// Up/Left
Direction.UpLeft = UP_LEFT;
// Up/Right
Direction.UpRight = UP_RIGHT;
// Down/Left
Direction.DownLeft = DOWN_LEFT;
// Down/Right
Direction.DownRight = DOWN_RIGHT;
exports.Direction = Direction;
//# sourceMappingURL=Direction.js.map
import { SimpleMove } from './SimpleMove';
/**
* Ход в позиции
* Move in position
*/

@@ -46,11 +46,11 @@ export declare class Move {

/**
* Добавить вариант и войти в него
* Add and enter variation
*/
addVariation(): Move;
/**
* Войти в вариант
* Enter variation
*/
moveIntoVariation(no: number): Move;
/**
* Выйти из варианта
* Exit variation
*/

@@ -57,0 +57,0 @@ exitVariation(): Window | this;

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

/**
* Ход в позиции
* Move in position
*/

@@ -126,3 +126,3 @@ var Move = (function () {

/**
* Добавить вариант и войти в него
* Add and enter variation
*/

@@ -139,3 +139,3 @@ Move.prototype.addVariation = function () {

/**
* Войти в вариант
* Enter variation
*/

@@ -150,3 +150,3 @@ Move.prototype.moveIntoVariation = function (no) {

/**
* Выйти из варианта
* Exit variation
*/

@@ -153,0 +153,0 @@ Move.prototype.exitVariation = function () {

@@ -89,29 +89,29 @@ "use strict";

};
/* tslint:disable:no-bitwise */
// Piece types (without color): ============
Piece.King = 0x01;
Piece.Queen = 0x02;
Piece.Rook = 0x03;
Piece.Bishop = 0x04;
Piece.Knight = 0x05;
Piece.Pawn = 0x06;
Piece.NoPiece = noPiece;
// White pieces: ============
Piece.WKing = 0x01;
Piece.WQueen = 0x02;
Piece.WRook = 0x03;
Piece.WBishop = 0x04;
Piece.WKnight = 0x05;
Piece.WPawn = 0x06;
// Black pieces: ============
Piece.BKing = 0x09;
Piece.BQueen = 0x0A;
Piece.BRook = 0x0B;
Piece.BBishop = 0x0C;
Piece.BKnight = 0x0D;
Piece.BPawn = 0x0E;
Piece.Score = [9999, 10, 6, 3, 3, 1];
return Piece;
}());
/* tslint:disable:no-bitwise */
// Piece types (without color): ============
Piece.King = 0x01;
Piece.Queen = 0x02;
Piece.Rook = 0x03;
Piece.Bishop = 0x04;
Piece.Knight = 0x05;
Piece.Pawn = 0x06;
Piece.NoPiece = noPiece;
// White pieces: ============
Piece.WKing = 0x01;
Piece.WQueen = 0x02;
Piece.WRook = 0x03;
Piece.WBishop = 0x04;
Piece.WKnight = 0x05;
Piece.WPawn = 0x06;
// Black pieces: ============
Piece.BKing = 0x09;
Piece.BQueen = 0x0A;
Piece.BRook = 0x0B;
Piece.BBishop = 0x0C;
Piece.BKnight = 0x0D;
Piece.BPawn = 0x0E;
Piece.Score = [9999, 10, 6, 3, 3, 1];
exports.Piece = Piece;
//# sourceMappingURL=Piece.js.map

@@ -43,8 +43,8 @@ import { Castle } from './Castle';

/**
* Копировать позицию
* @param source {ChessPosition}
* Copy position
* @param source {Position}
*/
copyFrom(source: Position): void;
/**
* Создать копию текущего объекта
* Clone position object
* @returns {ChessPosition}

@@ -55,3 +55,3 @@ */

/**
* Возвращает доску в виде массива байтов
* Byte board
*/

@@ -61,3 +61,3 @@ readonly Board: number[];

/**
* Возвращает фигуру на указанной клетке
* Get piece on square
*/

@@ -70,11 +70,11 @@ getPiece: (sq: number) => number;

/**
* Возвращает true если число указанных фигур больше нуля.
* Return true if count of specified piece great than zero.
*/
hasPiece(p: number): boolean;
/**
* Возвращает число указанных фигур
* Return count of specified piece.
*/
getPieceCount(p: number): number;
/**
* Добавить фигуру в позицию
* Add piece to square
* @param p

@@ -86,3 +86,3 @@ * @param sq

/**
* Убрать фигуру из позиции
* Remove piece from square
* @param p

@@ -94,23 +94,23 @@ * @param sq

/**
* Возвращает возможность сортировки.
* Return castling is enabled.
*/
getCastling(c: number, dir: Castle): boolean;
/**
* Устанавливает возможность сортировки.
* Set castling flag.
*/
setCastling(c: number, dir: Castle, flag: boolean): void;
/**
* Возвращает номер текущего полухода
* Return current halfmove humber
*/
readonly PlyCount: number;
/**
* Получает номер хода
* Get move number
*/
getMoveNo(): number;
/**
* Устанавливает номер хода
* Set move number
*/
setMoveNo(no: number): void;
/**
* Установить позицию из FEN
* Set position from fen
* @param fen {String}

@@ -120,3 +120,3 @@ */

/**
* Получает строку FEN для позиции
* Write FEN for position
*/

@@ -123,0 +123,0 @@ writeFEN(): string;

/**
* Клетки доски.
* Chess board squares.
* A1 = 0, B1 = 1, C1 = 2, ... G8 =62, H8 =63,

@@ -28,3 +28,3 @@ * COLOR_SQUARE = 64, NULL_SQUARE = 65

/**
* Получить направление движения для двух клеток.
* Get direction for move from square @fr to square @to.
*/

@@ -31,0 +31,0 @@ static direction(fr: number, to: number): number;

@@ -10,7 +10,7 @@ "use strict";

/**
* Имена столбцов клеток
* Fyle's names
*/
var hqs = ["a", "b", "c", "d", "e", "f", "g", "h"];
/**
* Перевод числовой нотации ячейки в буквенно числовую
* Conver square number to name
*/

@@ -21,3 +21,3 @@ function notation_Pos2Note(pos) {

/**
* Последняя клетка доска для перемещений.
* Last square for moves.
*/

@@ -93,3 +93,3 @@ var __squareLast = [

/**
* Ходы конем
* Knight moves
*/

@@ -165,3 +165,3 @@ var __knightAttacks = [

/**
* Ходы королем
* King moves
*/

@@ -250,3 +250,3 @@ var __kingAttacks = [

/**
* Клетки доски.
* Chess board squares.
* A1 = 0, B1 = 1, C1 = 2, ... G8 =62, H8 =63,

@@ -323,3 +323,3 @@ * COLOR_SQUARE = 64, NULL_SQUARE = 65

/**
* Получить направление движения для двух клеток.
* Get direction for move from square @fr to square @to.
*/

@@ -354,7 +354,7 @@ Square.direction = function (fr, to) {

};
/* tslint:disable:no-bitwise */
Square.NullSquare = ns;
return Square;
}());
/* tslint:disable:no-bitwise */
Square.NullSquare = ns;
exports.Square = Square;
//# sourceMappingURL=Square.js.map
{
"name": "onix-chess",
"version": "0.5.1",
"version": "1.0.0",
"description": "Onix chess library",

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

@@ -0,0 +0,0 @@ import { IUser } from 'onix-core/built/app/IUser';

@@ -0,0 +0,0 @@ /**

@@ -250,4 +250,2 @@ import { Hashtable } from 'onix-core/built/Hashtable';

// public get
private clear() {

@@ -254,0 +252,0 @@ this.GameId = 0;

@@ -0,0 +0,0 @@ const WHITE = 0;

@@ -203,3 +203,3 @@ /**

// вызов инициализации матрицы перемещений.
// Call initialization script.
(function () {

@@ -206,0 +206,0 @@ initializeDirections();

@@ -8,3 +8,3 @@ import * as shortid from 'shortid';

/**
* Ход в позиции
* Move in position
*/

@@ -143,3 +143,3 @@ export class Move {

/**
* Добавить вариант и войти в него
* Add and enter variation
*/

@@ -158,3 +158,3 @@ public addVariation(): Move {

/**
* Войти в вариант
* Enter variation
*/

@@ -171,3 +171,3 @@ public moveIntoVariation(no: number): Move {

/**
* Выйти из варианта
* Exit variation
*/

@@ -174,0 +174,0 @@ public exitVariation() {

@@ -0,0 +0,0 @@ import { Color } from './Color';

@@ -0,0 +0,0 @@ import { Color } from './Color';

@@ -10,3 +10,3 @@ import { Color } from './Color';

/**
* Имена столбцов клеток
* Fyle's names
*/

@@ -16,3 +16,3 @@ const hqs: string[] = ["a", "b", "c", "d", "e", "f", "g", "h"];

/**
* Перевод числовой нотации ячейки в буквенно числовую
* Conver square number to name
*/

@@ -24,3 +24,3 @@ function notation_Pos2Note(pos: number): string {

/**
* Последняя клетка доска для перемещений.
* Last square for moves.
*/

@@ -96,3 +96,3 @@ const __squareLast: number[][] = [

/**
* Ходы конем
* Knight moves
*/

@@ -168,3 +168,3 @@ const __knightAttacks: number[][] = [

/**
* Ходы королем
* King moves
*/

@@ -254,3 +254,3 @@ const __kingAttacks: number[][] = [

/**
* Клетки доски.
* Chess board squares.
* A1 = 0, B1 = 1, C1 = 2, ... G8 =62, H8 =63,

@@ -346,3 +346,3 @@ * COLOR_SQUARE = 64, NULL_SQUARE = 65

/**
* Получить направление движения для двух клеток.
* Get direction for move from square @fr to square @to.
*/

@@ -349,0 +349,0 @@ public static direction(fr: number, to: number): number {

@@ -0,0 +0,0 @@ export { Color } from './chess/Color';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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