]> git.sesse.net Git - remoteglot/commitdiff
Fix an issue where the prettyprinter would think that moving next to the
authorSteinar H. Gunderson <sesse@debian.org>
Thu, 28 Jun 2007 19:40:49 +0000 (21:40 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Thu, 28 Jun 2007 19:40:49 +0000 (21:40 +0200)
other side's king is a valid way of getting out of mate.

remoteglot.pl

index f6a94028ef2d4ac1d65705f20ed08261bd86b46d..eecad8f215d54efbac8d2a6e6aac4a63991566a0 100755 (executable)
@@ -542,7 +542,7 @@ sub in_check {
        for my $row (0..7) {
                for my $col (0..7) {
                        my $piece = substr($board->[$row], $col, 1);
        for my $row (0..7) {
                for my $col (0..7) {
                        my $piece = substr($board->[$row], $col, 1);
-                       next if ($piece eq '-' || lc($piece) eq 'k');
+                       next if ($piece eq '-');
                
                        if (uc($piece) eq $piece) {
                                # white piece
                
                        if (uc($piece) eq $piece) {
                                # white piece