test: add item testing

This commit is contained in:
2025-08-18 09:32:35 -05:00
parent ae42f6ead0
commit d72b6eec06
3 changed files with 263 additions and 125 deletions

View File

@@ -70,6 +70,17 @@ impl EntityType {
_ => TraversalFlags::empty(), // Static entities don't traverse
}
}
pub fn score_value(&self) -> Option<u32> {
match self {
EntityType::Pellet => Some(10),
EntityType::PowerPellet => Some(50),
_ => None,
}
}
pub fn is_collectible(&self) -> bool {
matches!(self, EntityType::Pellet | EntityType::PowerPellet)
}
}
/// A component for entities that have a sprite, with a layer for ordering.