Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit db10327

Browse files
authored
Release 0.3.1 (#13)
* Fix method typo * Fix typos * Release 0.3.1
1 parent 7da2234 commit db10327

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fenfurnace",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "A chess engine designed to work entirely from a FEN position.",
55
"keywords": [
66
"chess",

src/board/create-fen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function createFenFromBoardArray() {
2424
if (blankSquares > 0) fenString += blankSquares;
2525
blankSquares = 0;
2626

27-
if (i !== 7) fenString += '\/';
27+
if (i !== '7') fenString += '\/';
2828
}
2929

3030
//current turn

src/eval/evaluation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function evaluation() {
99
if (material > 0)
1010
whiteEval += material;
1111
else
12-
blackEval += Maths.abs(material);
12+
blackEval += Math.abs(material);
1313

1414
return whiteEval - blackEval;
1515
}

src/eval/material-diff.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function materialDifference() {
44
let points = { w: 0, b: 0 };
55

66
for (let i in gameData.boardArray) {
7-
for (let j = 0; j < i.length; i++) {
7+
for (let j = 0; j < i.length; j++) {
88
const colour = i[j] === i[j].toUpperCase() ? 'w' : 'b';
99
const piece = i[j].toLowerCase();
1010
const pointsIncrease = { p: 1, m: 3, b: 3, r: 5, q: 9 }[piece];

src/pieces.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export function move(startCell, endCell) {
2828
let originalPiece = getPieceInCell(startCell);
2929
add(originalPiece, endCell);
3030
del(startCell);
31+
return true;
3132
}
3233

3334
export function add(piece, cell) {

src/variables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default class GameData {
1515
static get boardArray() { return this.#boardArray; }
1616
static set boardArray(arr) { this.#boardArray = arr; }
1717

18-
static get empassantSquare() { return this.#enpassantSquare; }
19-
static set empassantSquare(val) { this.#enpassantSquare = val; }
18+
static get enpassantSquare() { return this.#enpassantSquare; }
19+
static set enpassantSquare(val) { this.#enpassantSquare = val; }
2020

2121
static get moveList() { return this.#moveList; }
2222
static set moveList(arr) { this.#moveList = arr; }

0 commit comments

Comments
 (0)