2008-06-28 Daigo Moriwaki <daigo at debian dot org>
* [shogi-server]
+ - A rating comment line is now written before the first move in a
+ record file instead of after the last move, which allows other
+ applications watching a game to recognize players in the middle
+ of the game.
+
+2008-06-27 Daigo Moriwaki <daigo at debian dot org>
+
+ * [shogi-server]
- Pairing players might not have shuffled players because of
poor shuffling algorithm. This issue has been fixed.
(Closes: #12661)
log(@game.board.to_s.gsub(/^/, "\'"))
end
- def log_rating
- log("'rating:%s\n" % [self.to_s]) if @game.rated?
- end
-
- def to_s
- black_name = @black.rated? ? @black.player_id : @black.name
- white_name = @white.rated? ? @white.player_id : @white.name
- return "%s:%s" % [black_name, white_name]
- end
-
def notify_monitor(type)
@game.each_monitor do |monitor|
monitor.write_safe(sprintf("##[MONITOR][%s] %s\n", @game.game_id, type))
@black.name, black_result,
@white.name, white_result])
- log_rating
end
end
def log_summary(type)
log_board
log("'summary:%s:%s draw:%s draw\n", type, @black.name, @white.name)
- log_rating
end
end
P9+KY+KE+GI+KI+OU+KI+GI+KE+KY
+
EOM
+ if rated?
+ 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])
+ end
end
def show()