mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 18:24:10 +02:00
wip
This commit is contained in:
parent
f3aadfe03d
commit
e71ba3b490
15 changed files with 416 additions and 92 deletions
|
|
@ -327,6 +327,12 @@ impl TeamSeasonMatch {
|
|||
score,
|
||||
score_opponent,
|
||||
..
|
||||
}
|
||||
| MatchResult::Unknown {
|
||||
opponent,
|
||||
score,
|
||||
score_opponent,
|
||||
..
|
||||
} => {
|
||||
let (team_home, team_away, score_home, score_away) = if self.side == Side::Home {
|
||||
(team.clone(), opponent.clone(), *score, *score_opponent)
|
||||
|
|
@ -372,6 +378,8 @@ pub enum MatchResult {
|
|||
ByeWeek,
|
||||
Unknown {
|
||||
opponent: TeamRef,
|
||||
score: u8,
|
||||
score_opponent: u8,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -382,6 +390,15 @@ impl MatchResult {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn opponents(&self) -> Option<&TeamRef> {
|
||||
match self {
|
||||
MatchResult::Played { opponent, .. }
|
||||
| MatchResult::Pending { opponent, .. }
|
||||
| MatchResult::Unknown { opponent, .. } => Some(opponent),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue