Skip Menu |

This queue is for tickets about the Chess CPAN distribution.

Report information
The Basics
Id: 28538
Status: resolved
Worked: 45 min
Priority: 0/
Queue: Chess

People
Owner: BJR [...] cpan.org
Requestors: vertolet666 [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug in Chess::Game
Date: Sun, 29 Jul 2007 15:54:21 +0400
To: bug-Chess [...] rt.cpan.org
From: Семичёв Сергей <vertolet666 [...] yandex.ru>
Hi! I'd like to report a bug in Chess::Game module. Distribution name and version: Chess-0.6.1. Perl version: v5.8.5 built for x86_64-linux-thread-multi. OS: Linux 2.6.11.7 In program below we have a strange result, black player is checkmated. You may see that there is no checkmate in this position on a chessboard. Just move pieces in the same order. ----------------------------------------------------------- #!/usr/bin/perl use strict; use Chess::Game; &load_game(); sub load_game { my $game = Chess::Game->new(); my $move_str = 'e2e4 e7e6 d2d4 f7f6 c1h6 g7h6 d1h5'; my @sq_moves = split(" ", $move_str); foreach (@sq_moves) { my ($sq1, $sq2); if (/^([a-hA-H])([1-8])([a-hA-H])([1-8])$/) { $sq1 = $1 . $2; $sq2 = $3 . $4; }; my $move = $game->make_move($sq1, $sq2); foreach ('white', 'black') { if ($game->player_checkmated($_)) { print "$_ is checkmated\n"; }; }; }; }; ### end of sub load_game --------------------------------------------------------------- Best regards, Sergei.
resolved in ticket 28540. thanks for your assistance.