mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
make names better
This commit is contained in:
parent
962b503751
commit
5fc302dec9
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ impl EntityMapMaker {
|
|||
}
|
||||
|
||||
pub fn add(&mut self, entity: crate::level::Item, location: Vector2D<i32>) {
|
||||
let idx = self.map.push((entity, location));
|
||||
self.map.push((entity, location));
|
||||
}
|
||||
|
||||
pub fn to_entity_map(mut self) -> (EntityMap, Vec<AnimationInstruction>) {
|
||||
pub fn make_entity_map(mut self) -> (EntityMap, Vec<AnimationInstruction>) {
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue