[Tkabber-dev] r950 - in trunk/tkabber-plugins: . renju

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Feb 16 23:54:58 MSK 2007


Author: sergei
Date: 2007-02-16 23:54:57 +0300 (Fri, 16 Feb 2007)
New Revision: 950

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/renju/renju.tcl
Log:
	* renju/renju.tcl: Added standard Gomoku variant (where overline
	  is not a win).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2007-02-16 20:53:05 UTC (rev 949)
+++ trunk/tkabber-plugins/ChangeLog	2007-02-16 20:54:57 UTC (rev 950)
@@ -4,6 +4,9 @@
 	  reversi/reversi.tcl: Fixed bug with sometimes undeleted cell border
 	  on mouse leave.
 
+	* renju/renju.tcl: Added standard Gomoku variant (where overline
+	  is not a win).
+
 2006-02-15  Sergei Golovan <sgolovan at nes.ru>
 
 	* renju/*: New game plugin Gomoku/Renju (unfinished yet, only

Modified: trunk/tkabber-plugins/renju/renju.tcl
===================================================================
--- trunk/tkabber-plugins/renju/renju.tcl	2007-02-16 20:53:05 UTC (rev 949)
+++ trunk/tkabber-plugins/renju/renju.tcl	2007-02-16 20:54:57 UTC (rev 950)
@@ -29,6 +29,7 @@
     set game_names_list \
 	[list \
 	    gomoku:freestyle  [::msgcat::mc "Free-style Gomoku"] \
+	    gomoku:standard   [::msgcat::mc "Standard Gomoku"] \
 	]
     array set game_names $game_names_list
 
@@ -104,7 +105,7 @@
 	-value gomoku:freestyle -variable [namespace current]::game
     pack $wf.freestyle -padx 15m -anchor w
     radiobutton $wf.standard -text [::msgcat::mc "Standard Gomoku"] \
-	-state disabled -value gomoku:standard -variable [namespace current]::game
+	-value gomoku:standard -variable [namespace current]::game
     pack $wf.standard -padx 15m -anchor w
     radiobutton $wf.renju -text [::msgcat::mc "Renju"] \
 	-state disabled -value renju -variable [namespace current]::game
@@ -1062,6 +1063,7 @@
 	    return [expr {$s1 >= 5 || $s2 >= 5 || $s3 >= 5 || $s4 >= 5}]
 	}
 	gomoku:standard {
+	    return [expr {$s1 == 5 || $s2 == 5 || $s3 == 5 || $s4 == 5}]
 	}
 	renju {
 	}



More information about the Tkabber-dev mailing list