fix for winners and loosers computed

This commit is contained in:
Jérémy Munsch 2021-02-12 02:37:40 +01:00
parent 34cf641f8d
commit e80bd3fdf7

View file

@ -324,12 +324,12 @@ $players = $db->requestAll("SELECT * FROM players ORDER BY name");
},
winners: function() {
return this.red_score > this.blue_score ?
this.redP1 + (this.redP2.length && this.redredP1P2 !== this.redP2 ? ' et ' + this.redP2 : ''):
this.redP1 + (this.redP2.length && this.redP1 !== this.redP2 ? ' et ' + this.redP2 : ''):
this.blueP1 + (this.blueP2.length && this.blueP1 !== this.blueP2 ? ' et ' + this.blueP2 : '');
},
loosers: function() {
return this.red_score < this.blue_score ?
this.redP1 + (this.redP2.length && this.redredP1P2 !== this.redP2 ? ' et ' + this.redP2 : ''):
this.redP1 + (this.redP2.length && this.redP1 !== this.redP2 ? ' et ' + this.redP2 : ''):
this.blueP1 + (this.blueP2.length && this.blueP1 !== this.blueP2 ? ' et ' + this.blueP2 : '');
},
winnercolor: function() {