1
Fork 0

TournamentTable: take into account players abandoned the tournament.

master
vonavi 2013-10-31 11:22:05 +02:00
parent 4ff6c18a56
commit 71dfb531f9
1 changed files with 8 additions and 3 deletions

View File

@ -26,6 +26,9 @@ module LORChess
@berger_coefs = [] @berger_coefs = []
@buffer = '' @buffer = ''
# Players who abandoned tournament
@players_retired = ['uroboros', 'LongLiveUbuntu']
# Correlate the player with his number # Correlate the player with his number
@player_numbers = {} @player_numbers = {}
@players.each_with_index { |player, i| @player_numbers[player] = i } @players.each_with_index { |player, i| @player_numbers[player] = i }
@ -34,9 +37,11 @@ module LORChess
calculate calculate
results_to_s results_to_s
# Remove Uroboros from the tournament (seppuku) # Remove retired players from the tournament (seppuku)
num = @player_numbers['uroboros'] @players_retired.each do |player|
@players[num] = '<del>uroboros</del>' num = @player_numbers[player]
@players[num] = "<del>#{player}</del>"
end
end end
def fill_results def fill_results