• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shogi-server source


Commit MetaInfo

Révisionaee61c65df8564b76867252f9f299eb205676bfc (tree)
l'heure2015-01-17 10:18:40
AuteurDaigo Moriwaki <daigo@debi...>
CommiterDaigo Moriwaki

Message de Log

Apply CSA Protocol V1.2.1 for MAX_MOVES

Change Summary

Modification

--- a/shogi-server
+++ b/shogi-server
@@ -276,7 +276,7 @@ def check_command_line
276276 $options["max-moves"] ||= 256
277277 $options["max-moves"] = $options["max-moves"].to_i
278278
279- $options["least-time-per-move"] ||= 1
279+ $options["least-time-per-move"] ||= 0
280280 $options["least-time-per-move"] = $options["least-time-per-move"].to_i
281281 end
282282
--- a/shogi_server/board.rb
+++ b/shogi_server/board.rb
@@ -626,7 +626,7 @@ EOF
626626 # - :uchifuzume
627627 # - :oute_kaihimore
628628 # - (:outori will not be returned)
629- # - :max_moves_draw
629+ # - :max_moves
630630 #
631631 def handle_one_move(str, sente=nil)
632632 if (str =~ /^([\+\-])(\d)(\d)(\d)(\d)([A-Z]{2})/)
@@ -719,7 +719,7 @@ EOF
719719 # When running test cases $options might be nil.
720720 if $options && $options["max-moves"] &&
721721 $options["max-moves"] > 0 && @move_count >= $options["max-moves"]
722- return :max_moves_draw
722+ return :max_moves
723723 end
724724
725725 return :normal
--- a/shogi_server/game.rb
+++ b/shogi_server/game.rb
@@ -292,7 +292,7 @@ class Game
292292 elsif (move_status == :oute_kaihimore)
293293 # the current player losed
294294 @result = GameResultOuteKaihiMoreWin.new(self, @next_player, @current_player)
295- elsif (move_status == :max_moves_draw)
295+ elsif (move_status == :max_moves)
296296 @result = GameResultMaxMovesDraw.new(self, @current_player, @next_player)
297297 else
298298 finish_flag = false
--- a/shogi_server/game_result.rb
+++ b/shogi_server/game_result.rb
@@ -346,13 +346,13 @@ end
346346 class GameResultMaxMovesDraw < GameResultDraw
347347 def initialize(game, winner, loser)
348348 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"
351351 end
352352
353353 def process
354354 @players.each do |player|
355- player.write_safe("#MAX_MOVES_DRAW\n#DRAW\n")
355+ player.write_safe("#MAX_MOVES\n#CENSORED\n")
356356 end
357357 # no log
358358 log_summary