$options["max-moves"] ||= 256
$options["max-moves"] = $options["max-moves"].to_i
- $options["least-time-per-move"] ||= 1
+ $options["least-time-per-move"] ||= 0
$options["least-time-per-move"] = $options["least-time-per-move"].to_i
end
# - :uchifuzume
# - :oute_kaihimore
# - (:outori will not be returned)
- # - :max_moves_draw
+ # - :max_moves
#
def handle_one_move(str, sente=nil)
if (str =~ /^([\+\-])(\d)(\d)(\d)(\d)([A-Z]{2})/)
# When running test cases $options might be nil.
if $options && $options["max-moves"] &&
$options["max-moves"] > 0 && @move_count >= $options["max-moves"]
- return :max_moves_draw
+ return :max_moves
end
return :normal
elsif (move_status == :oute_kaihimore)
# the current player losed
@result = GameResultOuteKaihiMoreWin.new(self, @next_player, @current_player)
- elsif (move_status == :max_moves_draw)
+ elsif (move_status == :max_moves)
@result = GameResultMaxMovesDraw.new(self, @current_player, @next_player)
else
finish_flag = false
class GameResultMaxMovesDraw < GameResultDraw
def initialize(game, winner, loser)
super
- @log_summary_type = "max_moves_draw"
- @result_type = "#MAX_MOVES_DRAW"
+ @log_summary_type = "max_moves"
+ @result_type = "#MAX_MOVES"
end
def process
@players.each do |player|
- player.write_safe("#MAX_MOVES_DRAW\n#DRAW\n")
+ player.write_safe("#MAX_MOVES\n#CENSORED\n")
end
# no log
log_summary