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

Commit

Permalink
Release 0.2.5 (#10)
Browse files Browse the repository at this point in the history
* castling bug fix

* Update package.json

* Release 0.2.5

Co-authored-by: Nixinova <42429413+Nixinova@users.noreply.github.com>
  • Loading branch information
adityatendulkar and Nixinova authored Jun 10, 2021
1 parent e15d47c commit 802da53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 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.2.4",
"version": "0.2.5",
"description": "A chess engine designed to work entirely from a FEN position.",
"keywords": [
"chess",
Expand Down
6 changes: 3 additions & 3 deletions src/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ export function makeMove(startCell, endCell, { isTest } = {}) {
}

//if rook or king make castling invalid
if (piece === 'k') {
if (piece.toLowerCase() === 'k') {
global.castling[colour] = { k: false, q: false };
} else if (piece === 'r') {
const isKingside = startCell === 'H';
} else if (piece.toLowerCase() === 'r') {
const isKingside = startCell[0] === 'H';
const side = isKingside ? 'k' : 'q';
global.castling[colour][side] = false;
}
Expand Down

0 comments on commit 802da53

Please sign in to comment.