From e15d47cdded2e6a4f181206466c89f6b5e1d686f Mon Sep 17 00:00:00 2001 From: tenmore <61951543+akatenmore@users.noreply.github.com> Date: Thu, 3 Jun 2021 12:29:06 +1200 Subject: [PATCH] Version 0.2.4 (#9) * Fixed logging bug. --- package-lock.json | 4 ++-- package.json | 2 +- src/validation.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a682731..03cd95a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fenfurnace", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "fenfurnace", - "version": "0.2.3", + "version": "0.2.4", "license": "ISC", "devDependencies": { "html-webpack-plugin": "^5.3.1", diff --git a/package.json b/package.json index afd2d2e..4642428 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fenfurnace", - "version": "0.2.3", + "version": "0.2.4", "description": "A chess engine designed to work entirely from a FEN position.", "keywords": [ "chess", diff --git a/src/validation.js b/src/validation.js index 205a7a1..8eaa763 100644 --- a/src/validation.js +++ b/src/validation.js @@ -207,7 +207,7 @@ export function makeMove(startCell, endCell, { isTest } = {}) { if (events.castled === true) { logText += endCell.charCodeAt(0) - startCell.charCodeAt(0) > 0 ? 'O-O' : 'O-O-O'; } else { - if (piece.toLowerCase() === 'p' && events.pieceCaptured) logText += startCell[1].toLowerCase(); + if (piece.toLowerCase() === 'p' && events.pieceCaptured) logText += startCell[0].toLowerCase(); else if (piece.toLowerCase() !== 'p') logText += piece.toUpperCase(); if (events.pieceCaptured) logText += 'x'; logText += endCell;