Pull in code from pool_elo

need to re-integrate yugioh code
This commit is contained in:
2024-09-03 01:52:20 -04:00
parent 921f2de61a
commit 4674289473
54 changed files with 1775 additions and 164 deletions

37
src/state_enums.rs Normal file
View File

@@ -0,0 +1,37 @@
use std::fmt::Display;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone)]
pub enum LoginState {
Authenticated,
NotAuthenticated,
Unknown,
}
#[derive(Serialize, Deserialize, Clone)]
pub enum ContentState {
None,
Inventory,
Tournaments,
}
impl Display for ContentState {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{}",
match self {
ContentState::Inventory => "Inventory",
ContentState::Tournaments => "Tournament",
ContentState::None => "",
}
)
}
}
#[derive(Serialize, Deserialize, Clone)]
pub enum OpenState {
Open,
Closed,
}