X-Git-Url: http://git.sourceforge.jp/view?p=shogi-server%2Fshogi-server.git;a=blobdiff_plain;f=shogi_server%2Fgame.rb;h=50bdbaaa8c52125069ea4aab1f1adb50b1a34c2b;hp=fb7ed18520779adf47b6688f4808de7a6cad64b8;hb=756e4372c5b0b439c2b1221ab27c8e763c2bfc6d;hpb=48967e86b1a0ca5ed7c67b882757b9acd2a58655 diff --git a/shogi_server/game.rb b/shogi_server/game.rb index fb7ed18..50bdbaa 100644 --- a/shogi_server/game.rb +++ b/shogi_server/game.rb @@ -1,7 +1,7 @@ ## $Id$ ## Copyright (C) 2004 NABEYA Kenichi (aka nanami@2ch) -## Copyright (C) 2007-2008 Daigo Moriwaki (daigo at debian dot org) +## Copyright (C) 2007-2012 Daigo Moriwaki (daigo at debian dot org) ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -335,6 +335,12 @@ class Game black_name = @sente.rated? ? @sente.player_id : @sente.name white_name = @gote.rated? ? @gote.player_id : @gote.name @fh.puts("'rating:%s:%s" % [black_name, white_name]) + if @sente.rated? && @sente.rate != 0 + @fh.puts("'black_rate:%s:%s" % [@sente.player_id, @sente.rate]) + end + if @gote.rated? && @gote.rate != 0 + @fh.puts("'white_rate:%s:%s" % [@gote.player_id, @gote.rate]) + end end unless @board.initial_moves.empty? @fh.puts "'buoy game starting with %d moves" % [@board.initial_moves.size]