When StopWatchClock is used, "Time_Unit:" of starting messages
in CSA protocol supplies "1min".
+2013-09-08 Daigo Moriwaki <daigo at debian dot org>
+
+ * [shogi-server]
+ - shogi_server/{game,time_clock}.rb:
+ When StopWatchClock is used, "Time_Unit:" of starting messages
+ in CSA protocol supplies "1min".
+
2013-04-07 Daigo Moriwaki <daigo at debian dot org>
* [shogi-server]
Rematch_On_Draw:NO
To_Move:+
BEGIN Time
-Time_Unit:1sec
+Time_Unit:#{@time_clock.time_unit}
Total_Time:#{@total_time}
Byoyomi:#{@byoyomi}
Least_Time_Per_Move:#{Least_Time_Per_Move}
Rematch_On_Draw:NO
To_Move:#{@board.teban ? "+" : "-"}
BEGIN Time
-Time_Unit:1sec
+Time_Unit:#{@time_clock.time_unit}
Total_Time:#{@total_time}
Byoyomi:#{@byoyomi}
Least_Time_Per_Move:#{Least_Time_Per_Move}
return 9999999
end
+ # Returns what "Time_Unit:" in CSA protocol should provide.
+ #
+ def time_unit
+ return "1sec"
+ end
+
# If thinking time runs out, returns true; false otherwise.
#
def timeout?(player, start_time, end_time)
super
end
+ def time_unit
+ return "1min"
+ end
+
def time_duration(start_time, end_time)
t = [(end_time - start_time).floor, @least_time_per_move].max
return (t / @byoyomi) * @byoyomi