Subject: | Problem in the computation of the FEN castling |
Date: | Tue, 2 Feb 2010 21:20:09 +0100 |
To: | bug-Chess-Rep [...] rt.cpan.org |
From: | Olivier Macchioni <olivier.macchioni [...] gmail.com> |
Version 0.6
Apparently there is a bug in some cases when computing the castling
availability.
For instance with this code:
#!/usr/bin/perl
use Chess::Rep;
my $pos = Chess::Rep->new("4k2r/6K1/8/8/8/8/8/8 w k - 0 16");
$pos->go_move ('Kxh8');
print $pos->get_fen()."\n";
I'd expect the resulting castling to be "-", ie no castling allowed. Instead
the result is the following:
4k2K/8/8/8/8/8/8/8 b k - 0 16
It doesn't make sense as there is no Rook left on the board,
Mac