Clean code

This commit is contained in:
TelepathicWalrus 2023-04-30 18:24:51 +01:00 committed by Maxicarlos08
parent e611d695b1
commit 6f0997705f
No known key found for this signature in database

View File

@ -116,19 +116,11 @@ pub enum StayFollow{
Follow,
}
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PetState{
pub stay: bool,
}
impl Default for PetState {
fn default() -> Self {
Self {
stay: false,
}
}
}
impl PetState {
pub fn get_state(&self) -> bool{
self.stay