mirror of https://github.com/MingweiSamuel/Riven
Adding QueueType enum
parent
57a37b5a0f
commit
42c6801453
|
@ -12,5 +12,8 @@ pub use season::*;
|
||||||
mod queue;
|
mod queue;
|
||||||
pub use queue::*;
|
pub use queue::*;
|
||||||
|
|
||||||
|
mod queue_type;
|
||||||
|
pub use queue_type::*;
|
||||||
|
|
||||||
mod team;
|
mod team;
|
||||||
pub use team::*;
|
pub use team::*;
|
|
@ -0,0 +1,28 @@
|
||||||
|
use std::fmt;
|
||||||
|
|
||||||
|
#[derive(fmt::Debug, Copy, Clone)]
|
||||||
|
pub enum QueueType {
|
||||||
|
// League of Legends, Summoner's Rift (5v5), Ranked Solo Queue.
|
||||||
|
RankedSolo5x5,
|
||||||
|
// League of Legends, Summoner's Rift (5v5), Flex Queue.
|
||||||
|
RankedFlexSr,
|
||||||
|
// League of Legends, Twisted Treeline (3v3), Flex Queue.
|
||||||
|
RankedFlexTt,
|
||||||
|
// Ranked Teamfight Tactics.
|
||||||
|
RankedTft,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl QueueType {
|
||||||
|
const NAMES: [&'static str; 4] = [
|
||||||
|
"RANKED_SOLO_5x5",
|
||||||
|
"RANKED_FLEX_SR",
|
||||||
|
"RANKED_FLEX_TT",
|
||||||
|
"RANKED_TFT",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for QueueType {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(f, "{}", Self::NAMES[*self as usize])
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue