OSDN Git Service

Added some module functions related to DateTime or Time.
[shogi-server/shogi-server.git] / shogi_server / game.rb
index 9e8f71b..e920105 100644 (file)
@@ -174,7 +174,7 @@ class Game
   end
 
   # class Game
-  def handle_one_move(str, player)
+  def handle_one_move(str, player, end_time)
     unless turn?(player)
       return false if str == :timeout
 
@@ -186,7 +186,7 @@ class Game
     end
 
     finish_flag = true
-    @end_time = Time::new
+    @end_time = end_time
     t = [(@end_time - @start_time).floor, Least_Time_Per_Move].max
     
     move_status = nil