onix-chess
Advanced tools
Comparing version 1.3.23 to 1.4.24
@@ -9,2 +9,6 @@ /** | ||
static K: string; | ||
static WQCastle: number; | ||
static WKCastle: number; | ||
static BQCastle: number; | ||
static BKCastle: number; | ||
} |
@@ -13,2 +13,6 @@ /** | ||
Castle.K = 'O-O'; | ||
Castle.WQCastle = 1; | ||
Castle.WKCastle = 2; | ||
Castle.BQCastle = 4; | ||
Castle.BKCastle = 8; | ||
return Castle; | ||
@@ -15,0 +19,0 @@ }()); |
@@ -7,5 +7,6 @@ import toSafeInteger from 'lodash-es/toSafeInteger'; | ||
import { Square } from './Square'; | ||
import { Position, FenStandartStart, ChessPositionStd, SanCheckLevel, GenerateMode } from './Position'; | ||
import { Position, ChessPositionStd, SanCheckLevel, GenerateMode } from './Position'; | ||
import { Move } from './Move'; | ||
import { SimpleMove } from './SimpleMove'; | ||
import { FenString } from './FenString'; | ||
export var ChessRatingType; | ||
@@ -144,3 +145,3 @@ (function (ChessRatingType) { | ||
this.moveList = {}; | ||
this.startFen = FenStandartStart; | ||
this.startFen = FenString.fenStandartStart; | ||
this.settings = settings || {}; | ||
@@ -150,3 +151,3 @@ this.Tags = new ChessTags(this); | ||
this.pgnLastMovePos = this.pgnNextMovePos = 0; | ||
if (this.settings.fen && (this.settings.fen != FenStandartStart)) { | ||
if (this.settings.fen && (this.settings.fen != FenString.fenStandartStart)) { | ||
this.startFen = this.settings.fen; | ||
@@ -185,3 +186,3 @@ this.startPos = new Position(this.settings.fen); | ||
get: function () { | ||
return this.startFen !== FenStandartStart; | ||
return this.startFen !== FenString.fenStandartStart; | ||
}, | ||
@@ -276,3 +277,3 @@ enumerable: true, | ||
if (!this.CurrentMove.Fen) { | ||
this.CurrentMove.Fen = this.currentPos.writeFEN(); | ||
this.CurrentMove.Fen = FenString.fromPosition(this.currentPos); | ||
} | ||
@@ -394,3 +395,3 @@ this.Fen = this.CurrentMove.Fen; | ||
this.currentPos.doSimpleMove(sm); | ||
newMove.Fen = currentPos.writeFEN(); | ||
newMove.Fen = FenString.fromPosition(currentPos); | ||
this.CurrentPlyCount++; | ||
@@ -397,0 +398,0 @@ if (!this.varDepth) { |
import { Castle } from './Castle'; | ||
import { SimpleMove } from './SimpleMove'; | ||
export declare const FenStandartStart = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; | ||
export declare const FenEmptyBoard = "8/8/8/8/8/8/8/8 w KQkq - 0 1"; | ||
export declare enum SanCheckLevel { | ||
@@ -19,5 +17,5 @@ NoCheckTest = 0, | ||
export declare class Position { | ||
private board; | ||
private captured; | ||
private plyCount; | ||
private brd; | ||
private capt; | ||
private plyCnt; | ||
private strictCastling; | ||
@@ -34,3 +32,3 @@ private pinned; | ||
private numOnSquareColor; | ||
private whoMove; | ||
private wm; | ||
Castling: number; | ||
@@ -112,11 +110,2 @@ EpTarget: number; | ||
/** | ||
* Set position from fen | ||
* @param fen {String} | ||
*/ | ||
readFromFEN(fen?: string): void; | ||
/** | ||
* Write FEN for position | ||
*/ | ||
writeFEN(): string; | ||
/** | ||
* Make the move on the board and update all the necessary | ||
@@ -123,0 +112,0 @@ * fields in the simpleMove structure so it can be undone. |
@@ -8,4 +8,4 @@ export { Intl } from './Intl'; | ||
export { SimpleMove } from './chess/SimpleMove'; | ||
export { Position, FenStandartStart, FenEmptyBoard } from './chess/Position'; | ||
export { Position, ChessPositionStd } from './chess/Position'; | ||
export { IOpeningPosition } from './chess/IOpeningPosition'; | ||
export { Chess } from './chess/Chess'; |
@@ -8,4 +8,4 @@ export { Intl } from './Intl'; | ||
export { SimpleMove } from './chess/SimpleMove'; | ||
export { Position, FenStandartStart, FenEmptyBoard } from './chess/Position'; | ||
export { Position, ChessPositionStd } from './chess/Position'; | ||
export { Chess } from './chess/Chess'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "onix-chess", | ||
"version": "1.3.23", | ||
"version": "1.4.24", | ||
"description": "Onix chess library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -11,2 +11,7 @@ /** | ||
public static K = 'O-O'; | ||
public static WQCastle = 1; | ||
public static WKCastle = 2; | ||
public static BQCastle = 4; | ||
public static BKCastle = 8; | ||
} |
@@ -9,6 +9,7 @@ import toSafeInteger from 'lodash-es/toSafeInteger'; | ||
import { Square } from './Square'; | ||
import { Position, FenStandartStart, ChessPositionStd, SanCheckLevel, GenerateMode } from './Position'; | ||
import { Position, ChessPositionStd, SanCheckLevel, GenerateMode } from './Position'; | ||
import { Move } from './Move'; | ||
import { SimpleMove } from './SimpleMove'; | ||
import { IChessUser } from '../app/IChessUser'; | ||
import { FenString } from './FenString'; | ||
@@ -177,3 +178,3 @@ export enum ChessRatingType { | ||
private startPos: Position; | ||
private startFen: string = FenStandartStart; | ||
private startFen: string = FenString.fenStandartStart; | ||
@@ -224,3 +225,3 @@ /** | ||
if (this.settings.fen && (this.settings.fen != FenStandartStart)) { | ||
if (this.settings.fen && (this.settings.fen != FenString.fenStandartStart)) { | ||
this.startFen = this.settings.fen; | ||
@@ -252,3 +253,3 @@ this.startPos = new Position(this.settings.fen); | ||
public get NonStandardStart(): boolean { | ||
return this.startFen !== FenStandartStart; | ||
return this.startFen !== FenString.fenStandartStart; | ||
} | ||
@@ -355,3 +356,3 @@ | ||
if (!this.CurrentMove.Fen) { | ||
this.CurrentMove.Fen = this.currentPos.writeFEN(); | ||
this.CurrentMove.Fen = FenString.fromPosition(this.currentPos); | ||
} | ||
@@ -485,3 +486,3 @@ | ||
this.currentPos.doSimpleMove(sm); | ||
newMove.Fen = currentPos.writeFEN() | ||
newMove.Fen = FenString.fromPosition(currentPos); | ||
this.CurrentPlyCount++; | ||
@@ -488,0 +489,0 @@ |
@@ -8,4 +8,4 @@ export { Intl } from './Intl'; | ||
export { SimpleMove } from './chess/SimpleMove'; | ||
export { Position, FenStandartStart, FenEmptyBoard } from './chess/Position'; | ||
export { Position, ChessPositionStd } from './chess/Position'; | ||
export { IOpeningPosition } from './chess/IOpeningPosition'; | ||
export { Chess } from './chess/Chess'; |
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
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
400341
59
7492
1