onix-chess
Advanced tools
Comparing version 6.7.1 to 6.7.2
@@ -484,4 +484,4 @@ "use strict"; | ||
moveFirst() { | ||
this.currentMove = this.CurrentMove.First; | ||
this.currentPos = new Position_1.Position(this.CurrentMove.fen); | ||
this.moveBegin(); | ||
this.moveForward(); | ||
} | ||
@@ -492,4 +492,4 @@ /** | ||
moveLast() { | ||
this.currentMove = this.CurrentMove.Last; | ||
this.currentPos = new Position_1.Position(this.currentMove.fen); | ||
this.moveEnd(); | ||
this.moveBackward(); | ||
} | ||
@@ -500,4 +500,3 @@ /** | ||
moveEnd() { | ||
this.currentMove = this.CurrentMove.End; | ||
this.currentPos = new Position_1.Position(this.currentMove.fen); | ||
this.moveToPly(9999); | ||
} | ||
@@ -513,3 +512,5 @@ /** | ||
this.currentMove = this.currentMove.Next; | ||
this.currentPos.doSimpleMove(this.currentMove.sm); | ||
if (!this.currentMove.END_MARKER) { | ||
this.currentPos.doSimpleMove(this.currentMove.sm); | ||
} | ||
this.positionChanged(); | ||
@@ -535,3 +536,3 @@ return true; | ||
} | ||
else { | ||
else if (!this.currentMove.END_MARKER) { | ||
this.currentPos.undoSimpleMove(this.currentMove.sm); | ||
@@ -538,0 +539,0 @@ } |
{ | ||
"name": "onix-chess", | ||
"version": "6.7.1", | ||
"version": "6.7.2", | ||
"description": "Onix chess library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -452,3 +452,3 @@ import toSafeInteger from 'lodash-es/toSafeInteger'; | ||
const move = this.currentMove.Prev!; | ||
const move = this.currentMove.Prev; | ||
const thisFen = move.fen; | ||
@@ -574,4 +574,4 @@ let rc = 1; | ||
public moveFirst() { | ||
this.currentMove = this.CurrentMove.First; | ||
this.currentPos = new Position(this.CurrentMove.fen); | ||
this.moveBegin(); | ||
this.moveForward(); | ||
} | ||
@@ -583,4 +583,4 @@ | ||
public moveLast() { | ||
this.currentMove = this.CurrentMove.Last; | ||
this.currentPos = new Position(this.currentMove.fen); | ||
this.moveEnd(); | ||
this.moveBackward(); | ||
} | ||
@@ -592,4 +592,3 @@ | ||
public moveEnd() { | ||
this.currentMove = this.CurrentMove.End; | ||
this.currentPos = new Position(this.currentMove.fen); | ||
this.moveToPly(9999); | ||
} | ||
@@ -607,3 +606,5 @@ | ||
this.currentMove = this.currentMove.Next!; | ||
this.currentPos.doSimpleMove(this.currentMove.sm!); | ||
if (!this.currentMove.END_MARKER) { | ||
this.currentPos.doSimpleMove(this.currentMove.sm!); | ||
} | ||
@@ -624,3 +625,3 @@ this.positionChanged(); | ||
if (this.currentMove.Prev!.START_MARKER) { | ||
if (this.currentMove.Prev.START_MARKER) { | ||
if (this.currentMove.inVariation()) { | ||
@@ -634,7 +635,7 @@ this.currentPos.undoSimpleMove(this.currentMove.sm!); | ||
this.currentPos.copyFrom(this.startPos); | ||
} else { | ||
} else if (!this.currentMove.END_MARKER) { | ||
this.currentPos.undoSimpleMove(this.currentMove.sm!); | ||
} | ||
this.currentMove = this.currentMove.Prev!; | ||
this.currentMove = this.currentMove.Prev; | ||
@@ -641,0 +642,0 @@ this.positionChanged(); |
Sorry, the diff of this file is not supported yet
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
9370
489668