joshmcarthur/Latter — Issue #6: Ranking calculated incorrectly
Author: joshmcarthur
Created: 2012-03-07 21:17:03+00:00
State: open

Currently the ranking is calculated with the following function:

``` ruby
Player.all.sort_by { |player| player.winning_percentage(false) }.reverse.index(self) + 1
```

This works, but fails to take into account that the winning percentage is representative of the players performance only within their own challenges (defended and challenged), not the wider ecosystem of players.

Instead, the ranking algorithm should calculate a more advanced figure that is based on the players performance in relation to other players on the board.