[Tkabber-dev] r1484 - in trunk/tkabber-plugins: . chess

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Aug 8 19:21:35 MSD 2008


Author: sergei
Date: 2008-08-08 19:21:34 +0400 (Fri, 08 Aug 2008)
New Revision: 1484

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/chess/chess.tcl
Log:
	* chess/chess.tcl: Fixed bug with forbidden castling in case when
	  pieces has moved.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-08-08 12:43:59 UTC (rev 1483)
+++ trunk/tkabber-plugins/ChangeLog	2008-08-08 15:21:34 UTC (rev 1484)
@@ -8,6 +8,9 @@
 
 	* chess/msgs/ru.msg: Updated Russian translation.
 
+	* chess/chess.tcl: Fixed bug with forbidden castling in case when
+	  pieces has moved.
+
 2008-07-12  Sergei Golovan <sgolovan at nes.ru>
 
 	* whiteboard/whiteboard.tcl: Fixed typo.

Modified: trunk/tkabber-plugins/chess/chess.tcl
===================================================================
--- trunk/tkabber-plugins/chess/chess.tcl	2008-08-08 12:43:59 UTC (rev 1483)
+++ trunk/tkabber-plugins/chess/chess.tcl	2008-08-08 15:21:34 UTC (rev 1484)
@@ -955,14 +955,14 @@
 
     if {$rt == (7 - $r)} {
 	if {$ct == 0} {
-	    set flags(position,${opp},qcastling) 0
+	    set flags(position,${opp}k,qcastling) 0
 	} elseif {$ct == 7} {
-	    set flags(position,${opp},kcastling) 0
+	    set flags(position,${opp}k,kcastling) 0
 	}
     }
     if {$flags(position,$ct,$rt) == "${p}k"} {
- 	set flags(position,${p},kcastling) 0
- 	set flags(position,${p},qcastling) 0
+ 	set flags(position,${p}k,kcastling) 0
+ 	set flags(position,${p}k,qcastling) 0
  	if {($ct - $cf) == 2} {
  	    set opts {0-0}
  	    set flags(position,5,$r) "${p}r"
@@ -974,9 +974,9 @@
  	}
     } elseif {$flags(position,$ct,$rt) == "${p}r"} {
  	if {($cf == 0) && ($rf == $r)} {
- 	    set flags(position,${p},qcastling) 0
+ 	    set flags(position,${p}k,qcastling) 0
  	} elseif {($cf == 7) && ($rf == $r)} {
- 	    set flags(position,${p},kcastling) 0
+ 	    set flags(position,${p}k,kcastling) 0
  	}
     }
 



More information about the Tkabber-dev mailing list