diff --git a/examples/the-dungeon-puzzlers-lament/src/game/simulation.rs b/examples/the-dungeon-puzzlers-lament/src/game/simulation.rs index 574fda1b..997c332a 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/simulation.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/simulation.rs @@ -45,7 +45,7 @@ impl Simulation { entities.add(item, location); } - let (entities, animations) = entities.to_entity_map(); + let (entities, animations) = entities.make_entity_map(); for ani in animations { animation.populate(ani, sfx); } diff --git a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs index 6d38b2ee..b697dff2 100644 --- a/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs +++ b/examples/the-dungeon-puzzlers-lament/src/game/simulation/entity.rs @@ -34,10 +34,10 @@ impl EntityMapMaker { } pub fn add(&mut self, entity: crate::level::Item, location: Vector2D) { - let idx = self.map.push((entity, location)); + self.map.push((entity, location)); } - pub fn to_entity_map(mut self) -> (EntityMap, Vec) { + pub fn make_entity_map(mut self) -> (EntityMap, Vec) { self.map .sort_unstable_by_key(|(_, location)| location.x + location.y * 100); let mut entity_map = EntityMap { @@ -1111,7 +1111,7 @@ mod tests { simulator.add(solution_entity.0, solution_entity.1); } - let (mut simulator, _) = simulator.to_entity_map(); + let (mut simulator, _) = simulator.make_entity_map(); for &direction in level.directions { let (outcome, _) = simulator.tick(&level.map, Action::Direction(direction));