OSDN Git Service

Ignore games of players who have SAME id.
[shogi-server/shogi-server.git] / mk_rate
diff --git a/mk_rate b/mk_rate
index 67fae39..e520d6b 100755 (executable)
--- a/mk_rate
+++ b/mk_rate
@@ -418,8 +418,11 @@ def grep(file)
   end
   if /^'rating:(.*)$/ =~ str
     black_id, white_id = $1.split(":").map {|a| a.strip}
-    add(black_mark, identify_id(black_id),
-        identify_id(white_id), white_mark, time)
+    black_id = identify_id(black_id)
+    white_id = identify_id(white_id)
+    unless black_id == white_id
+      add(black_mark, black_id, white_id, white_mark, time)
+    end
   end
 end