refactor: remove dead code, tune lints, remove useless tests

This commit is contained in:
Ryan Walters
2025-09-09 14:20:32 -05:00
parent 139afb2d40
commit ca006b5073
24 changed files with 148 additions and 518 deletions

View File

@@ -1,5 +1,5 @@
use bevy_ecs::{entity::Entity, system::RunSystemOnce};
use pacman::systems::{is_valid_item_collision, item_system, EntityType, GhostState, Position, ScoreResource};
use pacman::systems::{item_system, EntityType, GhostState, Position, ScoreResource};
use speculoos::prelude::*;
mod common;
@@ -24,21 +24,6 @@ fn test_is_collectible_item() {
assert_that(&EntityType::Ghost.is_collectible()).is_false();
}
#[test]
fn test_is_valid_item_collision() {
// Player-item collisions should be valid
assert_that(&is_valid_item_collision(EntityType::Player, EntityType::Pellet)).is_true();
assert_that(&is_valid_item_collision(EntityType::Player, EntityType::PowerPellet)).is_true();
assert_that(&is_valid_item_collision(EntityType::Pellet, EntityType::Player)).is_true();
assert_that(&is_valid_item_collision(EntityType::PowerPellet, EntityType::Player)).is_true();
// Non-player-item collisions should be invalid
assert_that(&is_valid_item_collision(EntityType::Player, EntityType::Ghost)).is_false();
assert_that(&is_valid_item_collision(EntityType::Ghost, EntityType::Pellet)).is_false();
assert_that(&is_valid_item_collision(EntityType::Pellet, EntityType::PowerPellet)).is_false();
assert_that(&is_valid_item_collision(EntityType::Player, EntityType::Player)).is_false();
}
#[test]
fn test_item_system_pellet_collection() {
let mut world = common::create_test_world();