OSDN Git Service

The 'test' directory has been moved under 'shogi-server'
[shogi-server/shogi-server.git] / pairing.rb
index 3a577e9..6a922d8 100644 (file)
@@ -94,11 +94,11 @@ module ShogiServer
       remains     = players - win_players
       if win_players.size >= 2
         if win_players.size % 2 == 1
-          if include_newbie?(win_players)
+#          if include_newbie?(win_players)
             remains << delete_player_at_random(win_players)
-          else
-            remains << delete_least_rate_player(win_players)
-          end
+#          else
+#            remains << delete_least_rate_player(win_players)
+#          end
         end         
         pairing_and_start_game(win_players)
       else
@@ -124,9 +124,9 @@ module ShogiServer
     def match(players)
       if @sacrifice && 
          players.size % 2 == 1 && 
-         players.find{|a| a.id == @sacrifice}
+         players.find{|a| a.player_id == @sacrifice}
         log_message("Floodgate: first, exclude %s" % [@sacrifice])
-        players.delete_if{|a| a.id == @sacrifice}
+        players.delete_if{|a| a.player_id == @sacrifice}
       end
       @pairing.match(players)
     end