shogi-server source
Révision | aee61c65df8564b76867252f9f299eb205676bfc (tree) |
---|---|
l'heure | 2015-01-17 10:18:40 |
Auteur | Daigo Moriwaki <daigo@debi...> |
Commiter | Daigo Moriwaki |
Apply CSA Protocol V1.2.1 for MAX_MOVES
@@ -276,7 +276,7 @@ def check_command_line | ||
276 | 276 | $options["max-moves"] ||= 256 |
277 | 277 | $options["max-moves"] = $options["max-moves"].to_i |
278 | 278 | |
279 | - $options["least-time-per-move"] ||= 1 | |
279 | + $options["least-time-per-move"] ||= 0 | |
280 | 280 | $options["least-time-per-move"] = $options["least-time-per-move"].to_i |
281 | 281 | end |
282 | 282 |
@@ -626,7 +626,7 @@ EOF | ||
626 | 626 | # - :uchifuzume |
627 | 627 | # - :oute_kaihimore |
628 | 628 | # - (:outori will not be returned) |
629 | - # - :max_moves_draw | |
629 | + # - :max_moves | |
630 | 630 | # |
631 | 631 | def handle_one_move(str, sente=nil) |
632 | 632 | if (str =~ /^([\+\-])(\d)(\d)(\d)(\d)([A-Z]{2})/) |
@@ -719,7 +719,7 @@ EOF | ||
719 | 719 | # When running test cases $options might be nil. |
720 | 720 | if $options && $options["max-moves"] && |
721 | 721 | $options["max-moves"] > 0 && @move_count >= $options["max-moves"] |
722 | - return :max_moves_draw | |
722 | + return :max_moves | |
723 | 723 | end |
724 | 724 | |
725 | 725 | return :normal |
@@ -292,7 +292,7 @@ class Game | ||
292 | 292 | elsif (move_status == :oute_kaihimore) |
293 | 293 | # the current player losed |
294 | 294 | @result = GameResultOuteKaihiMoreWin.new(self, @next_player, @current_player) |
295 | - elsif (move_status == :max_moves_draw) | |
295 | + elsif (move_status == :max_moves) | |
296 | 296 | @result = GameResultMaxMovesDraw.new(self, @current_player, @next_player) |
297 | 297 | else |
298 | 298 | finish_flag = false |
@@ -346,13 +346,13 @@ end | ||
346 | 346 | class GameResultMaxMovesDraw < GameResultDraw |
347 | 347 | def initialize(game, winner, loser) |
348 | 348 | super |
349 | - @log_summary_type = "max_moves_draw" | |
350 | - @result_type = "#MAX_MOVES_DRAW" | |
349 | + @log_summary_type = "max_moves" | |
350 | + @result_type = "#MAX_MOVES" | |
351 | 351 | end |
352 | 352 | |
353 | 353 | def process |
354 | 354 | @players.each do |player| |
355 | - player.write_safe("#MAX_MOVES_DRAW\n#DRAW\n") | |
355 | + player.write_safe("#MAX_MOVES\n#CENSORED\n") | |
356 | 356 | end |
357 | 357 | # no log |
358 | 358 | log_summary |