mirror of https://github.com/MingweiSamuel/Riven
Add EMERALD tier
parent
908d0d64ed
commit
07a96f5fa9
|
@ -90,12 +90,12 @@ mod tests {
|
||||||
assert_eq!(Some((Tier::DIAMOND, Division::II)), it.next());
|
assert_eq!(Some((Tier::DIAMOND, Division::II)), it.next());
|
||||||
assert_eq!(Some((Tier::DIAMOND, Division::III)), it.next());
|
assert_eq!(Some((Tier::DIAMOND, Division::III)), it.next());
|
||||||
assert_eq!(Some((Tier::DIAMOND, Division::IV)), it.next());
|
assert_eq!(Some((Tier::DIAMOND, Division::IV)), it.next());
|
||||||
|
assert_eq!(Some((Tier::EMERALD, Division::I)), it.next());
|
||||||
|
assert_eq!(Some((Tier::EMERALD, Division::II)), it.next());
|
||||||
|
assert_eq!(Some((Tier::EMERALD, Division::III)), it.next());
|
||||||
|
assert_eq!(Some((Tier::EMERALD, Division::IV)), it.next());
|
||||||
assert_eq!(Some((Tier::PLATINUM, Division::I)), it.next());
|
assert_eq!(Some((Tier::PLATINUM, Division::I)), it.next());
|
||||||
let mut last = None;
|
let last = it.last();
|
||||||
for next in &mut it {
|
|
||||||
last = Some(next);
|
|
||||||
}
|
|
||||||
assert_eq!(Some((Tier::IRON, Division::IV)), last);
|
assert_eq!(Some((Tier::IRON, Division::IV)), last);
|
||||||
assert_eq!(None, it.next());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,8 @@ pub enum Tier {
|
||||||
MASTER = 180,
|
MASTER = 180,
|
||||||
/// Diamond, the higest non-apex tier. Repr: `140_u8`.
|
/// Diamond, the higest non-apex tier. Repr: `140_u8`.
|
||||||
DIAMOND = 140,
|
DIAMOND = 140,
|
||||||
|
/// Emerald. Added in 2023. Repr: `130_u8`.
|
||||||
|
EMERALD = 130,
|
||||||
/// Platinum. Repr: `120_u8`.
|
/// Platinum. Repr: `120_u8`.
|
||||||
PLATINUM = 120,
|
PLATINUM = 120,
|
||||||
/// Gold. Repr: `100_u8`.
|
/// Gold. Repr: `100_u8`.
|
||||||
|
@ -109,6 +111,7 @@ impl IntoEnumIterator for Tier {
|
||||||
Self::GRANDMASTER,
|
Self::GRANDMASTER,
|
||||||
Self::MASTER,
|
Self::MASTER,
|
||||||
Self::DIAMOND,
|
Self::DIAMOND,
|
||||||
|
Self::EMERALD,
|
||||||
Self::PLATINUM,
|
Self::PLATINUM,
|
||||||
Self::GOLD,
|
Self::GOLD,
|
||||||
Self::SILVER,
|
Self::SILVER,
|
||||||
|
@ -188,6 +191,7 @@ mod tests {
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
assert_eq!(Some(Tier::DIAMOND), iter.next());
|
assert_eq!(Some(Tier::DIAMOND), iter.next());
|
||||||
|
assert_eq!(Some(Tier::EMERALD), iter.next());
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
|
@ -202,6 +206,7 @@ mod tests {
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
|
assert_eq!(Some(Tier::EMERALD), iter.next());
|
||||||
assert_eq!(Some(Tier::DIAMOND), iter.next());
|
assert_eq!(Some(Tier::DIAMOND), iter.next());
|
||||||
iter.next();
|
iter.next();
|
||||||
iter.next();
|
iter.next();
|
||||||
|
|
Loading…
Reference in New Issue