+ computed: { //TODO: first sort on score, then on Pdt (and reciprocally) --> function add fraction relative Pdt / score (compute min max first, take care of 0 case)
sortedPlayers: function() {
let sortFunc = this.sortMethod == "score"
? this.sortByScore
: this.sortByPdt;
sortedPlayers: function() {
let sortFunc = this.sortMethod == "score"
? this.sortByScore
: this.sortByPdt;
- return this.players
- .map( p => { return p; }) //to not alter original array
+ let res = this.players
+ .map( p => { return Object.assign({}, p); }) //to not alter original array
.sort(sortFunc);
.sort(sortFunc);
+ // Add rank information (taking care of ex-aequos)