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

Commit

Permalink
Release 0.3.1 (#13)
Browse files Browse the repository at this point in the history
* Fix method typo

* Fix typos

* Release 0.3.1
  • Loading branch information
Nixinova authored Jul 5, 2021
1 parent 7da2234 commit db10327
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fenfurnace",
"version": "0.3.0",
"version": "0.3.1",
"description": "A chess engine designed to work entirely from a FEN position.",
"keywords": [
"chess",
Expand Down
2 changes: 1 addition & 1 deletion src/board/create-fen.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function createFenFromBoardArray() {
if (blankSquares > 0) fenString += blankSquares;
blankSquares = 0;

if (i !== 7) fenString += '\/';
if (i !== '7') fenString += '\/';
}

//current turn
Expand Down
2 changes: 1 addition & 1 deletion src/eval/evaluation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function evaluation() {
if (material > 0)
whiteEval += material;
else
blackEval += Maths.abs(material);
blackEval += Math.abs(material);

return whiteEval - blackEval;
}
2 changes: 1 addition & 1 deletion src/eval/material-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function materialDifference() {
let points = { w: 0, b: 0 };

for (let i in gameData.boardArray) {
for (let j = 0; j < i.length; i++) {
for (let j = 0; j < i.length; j++) {
const colour = i[j] === i[j].toUpperCase() ? 'w' : 'b';
const piece = i[j].toLowerCase();
const pointsIncrease = { p: 1, m: 3, b: 3, r: 5, q: 9 }[piece];
Expand Down
1 change: 1 addition & 0 deletions src/pieces.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function move(startCell, endCell) {
let originalPiece = getPieceInCell(startCell);
add(originalPiece, endCell);
del(startCell);
return true;
}

export function add(piece, cell) {
Expand Down
4 changes: 2 additions & 2 deletions src/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default class GameData {
static get boardArray() { return this.#boardArray; }
static set boardArray(arr) { this.#boardArray = arr; }

static get empassantSquare() { return this.#enpassantSquare; }
static set empassantSquare(val) { this.#enpassantSquare = val; }
static get enpassantSquare() { return this.#enpassantSquare; }
static set enpassantSquare(val) { this.#enpassantSquare = val; }

static get moveList() { return this.#moveList; }
static set moveList(arr) { this.#moveList = arr; }
Expand Down

0 comments on commit db10327

Please sign in to comment.