OSDN Git Service

set regal_move in case of timeout
authornabeken <nabeken@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sun, 27 Jun 2004 15:45:12 +0000 (15:45 +0000)
committernabeken <nabeken@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Sun, 27 Jun 2004 15:45:12 +0000 (15:45 +0000)
shogi-server

index 3594fc3..cede694 100755 (executable)
@@ -550,6 +550,7 @@ class Game
       @end_time = Time::new
       t = @end_time - @start_time
       t = Least_Time_Per_Move if (t < Least_Time_Per_Move)
+      legal_move = true
       if (str != :timeout)
         legal_move = @board.handle_one_move(str)
         if (legal_move)
@@ -820,7 +821,8 @@ def main
         $mutex.lock
         if (player.game)
           player.game.finish
-        elsif (player.status != "finished")
+        end
+        if (player.status != "finished")
           player.finish
         end
         LEAGUE.delete(player)