mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Simplify winner lookup
This commit is contained in:
parent
bfc5ccd6d0
commit
041d826396
@ -45,18 +45,10 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
|
|
||||||
if (pairing != null)
|
if (pairing != null)
|
||||||
{
|
{
|
||||||
completed.BindTo(pairing.Completed);
|
isWinner = () => pairing.Winner == Team;
|
||||||
|
|
||||||
if (team == pairing.Team1.Value)
|
completed.BindTo(pairing.Completed);
|
||||||
{
|
score.BindTo(team == pairing.Team1.Value ? pairing.Team1Score : pairing.Team2Score);
|
||||||
score.BindTo(pairing.Team1Score);
|
|
||||||
isWinner = () => pairing.Team1Score.Value > pairing.Team2Score.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
score.BindTo(pairing.Team2Score);
|
|
||||||
isWinner = () => pairing.Team2Score.Value > pairing.Team1Score.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user