OSDN Git Service

Fix some lint warnings
[shogi-server/shogi-server.git] / shogi_server / league / floodgate.rb
index e52c3c3..da46a8a 100644 (file)
@@ -12,7 +12,7 @@ class League
       # ex. "floodgate-900-0"
       #
       def game_name?(str)
-        return /^floodgate\-\d+\-\d+$/.match(str) ? true : false
+        return /^floodgate\-\d+\-\d+F?$/.match(str) ? true : false
       end
 
       def history_file_path(gamename)
@@ -388,12 +388,12 @@ class League
         @@mutex.synchronize do
           records = @records.reverse
         end
-        rc = records.find do |rc|
+        ret = records.find do |rc|
           rc[:winner] && 
           rc[:loser]  && 
           (rc[:black] == player_id || rc[:white] == player_id)
         end
-        return rc
+        return ret
       end
 
       def win_games(player_id)
@@ -401,10 +401,10 @@ class League
         @@mutex.synchronize do
           records = @records.reverse
         end
-        rc = records.find_all do |rc|
+        ret = records.find_all do |rc|
           rc[:winner] == player_id && rc[:loser]
         end
-        return rc
+        return ret
       end
 
       def loss_games(player_id)
@@ -412,10 +412,10 @@ class League
         @@mutex.synchronize do
           records = @records.reverse
         end
-        rc = records.find_all do |rc|
+        ret = records.find_all do |rc|
           rc[:winner] && rc[:loser] == player_id
         end
-        return rc
+        return ret
       end
     end # class History