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.000000000 +0200
+++ cgosGtp.tcl 2008-08-14 09:51:08.000000000 +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
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/