Re: [computer-go] kgs-game_over support for the cgos client

2008-08-15 Thread Jason House
I think it's be generally useful. Someone else recently posted about  
post-game pondering problems.


I can commit this code this weekend, but can not post a release. I  
keep hoping Don will embrace file releases through SourceForge since  
we both have access to it...


Sent from my iPhone

On Aug 14, 2008, at 4:14 AM, Urban Hafner [EMAIL PROTECTED] wrote:


Hej everybody,

attached is a patch to the current cgosGtp.tcl client. It adds support
for the kgs-game_over command, i.e. if the engine supports it this
command will be sent when the client receives the gameover command  
from

the server.

Maybe this is useful for others, too. For me it is important as my
engine is pondering and if the other engine resigns a game it  
continues

to ponder until the next game is started.

Urban
cgosGtp.tcl.patch
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/


[computer-go] kgs-game_over support for the cgos client

2008-08-14 Thread Urban Hafner
Hej everybody,

attached is a patch to the current cgosGtp.tcl client. It adds support
for the kgs-game_over command, i.e. if the engine supports it this
command will be sent when the client receives the gameover command from
the server.

Maybe this is useful for others, too. For me it is important as my
engine is pondering and if the other engine resigns a game it continues
to ponder until the next game is started.

Urban
--- /home/urban/Desktop/cgosGtp.tcl	2008-07-31 19:07:57.0 +0200
+++ cgosGtp.tcl	2008-08-14 09:51:08.0 +0200
@@ -240,6 +240,7 @@
 global inout
 global progpid
 global use_time
+global send_gameover
 
 set inout [open |$invoke r+]
 
@@ -282,6 +283,16 @@
 } else {
 log  Engine does NOT use time control commands
 }
+# determine if engine support kgs-game_over
+set send_gameover 0
+if {[info exists known(kgs-game_over)]} {
+set send_gameover 1
+}
+if {$send_gameover} {
+log Engine supports kgs-game_over
+} else {
+log Engie does NOT support kgs-game_over
+}
 }
 
 
@@ -524,6 +535,11 @@
 }
 }
 
+# Send kgs-game_over if the client supports it
+if {$send_gameover == 1} {
+set msg [eCmd $inout kgs-game_over]
+}
+
 		lassign $s res dte err
 set switchedPlayers [switchPlayer $first]
 if { $switchedPlayers == 1 } {
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Re: [computer-go] kgs-game_over support for the cgos client

2008-08-14 Thread Don Dailey
I can either post this on CGOS or just incorporate it into the current
client if it looks solid.  

- Don


On Thu, 2008-08-14 at 10:14 +0200, Urban Hafner wrote:
 Hej everybody,
 
 attached is a patch to the current cgosGtp.tcl client. It adds support
 for the kgs-game_over command, i.e. if the engine supports it this
 command will be sent when the client receives the gameover command from
 the server.
 
 Maybe this is useful for others, too. For me it is important as my
 engine is pondering and if the other engine resigns a game it continues
 to ponder until the next game is started.
 
 Urban
 ___
 computer-go mailing list
 computer-go@computer-go.org
 http://www.computer-go.org/mailman/listinfo/computer-go/

___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/


Re: [computer-go] kgs-game_over support for the cgos client

2008-08-14 Thread Urban Hafner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Don Dailey wrote:
 I can either post this on CGOS or just incorporate it into the current
 client if it looks solid.  

It worked for me for the last few hours so I think it's solid.  But
maybe other people have tried it, too.

Urban
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkikL/4ACgkQggNuVCIrEyX3kgCgk8SMJr1C3aJDP5hhhFsJIRvh
Wr0AoLa8stG0dhO2SOAD6s7mnWhmC9m0
=iTOe
-END PGP SIGNATURE-
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/