Skip to content

Commit

Permalink
Merge pull request #78 from sohosai/feautres/#76-add-area
Browse files Browse the repository at this point in the history
エリアを拡充
  • Loading branch information
puripuri2100 authored Sep 11, 2023
2 parents dc4d24a + 9317650 commit abff6a1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ pub enum Area {
Area2,
/// 第三エリア
Area3,
/// 中央図書館
CenterLibrary,
/// 石の広場
IshiSquare,
/// 医学エリア
Igaku,
/// 体育芸術エリア
Taigei,
/// 春日エリア
Kasuga,
/// 一の矢
Ichinoya,
/// 平砂
Hirasuna,
/// 追越
Oikoshi,
}

impl std::fmt::Display for Area {
Expand All @@ -179,6 +195,14 @@ impl std::fmt::Display for Area {
Area::Area1 => write!(f, "area1")?,
Area::Area2 => write!(f, "area2")?,
Area::Area3 => write!(f, "area3")?,
Area::CenterLibrary => write!(f, "center_library")?,
Area::IshiSquare => write!(f, "ishi_square")?,
Area::Igaku => write!(f, "igaku")?,
Area::Taigei => write!(f, "taigei")?,
Area::Kasuga => write!(f, "kasuga")?,
Area::Ichinoya => write!(f, "ichinoya")?,
Area::Hirasuna => write!(f, "hirasuna")?,
Area::Oikoshi => write!(f, "oikoshi")?,
};
Ok(())
}
Expand All @@ -190,6 +214,14 @@ impl From<std::string::String> for Area {
"area1" => Area::Area1,
"area2" => Area::Area2,
"area3" => Area::Area3,
"center_library" => Area::CenterLibrary,
"ishi_square" => Area::IshiSquare,
"igaku" => Area::Igaku,
"taigei" => Area::Taigei,
"kasuga" => Area::Taigei,
"ichinoya" => Area::Ichinoya,
"hirasuna" => Area::Hirasuna,
"okioshi" => Area::Oikoshi,
_ => panic!(),
}
}
Expand Down

0 comments on commit abff6a1

Please sign in to comment.