clean
This commit is contained in:
parent
af0b9f9222
commit
80c0c8c194
@ -76,12 +76,14 @@ impl Model {
|
||||
}
|
||||
|
||||
let mut grids: Vec<Grid> = Vec::new();
|
||||
for _ in 0..n_populations {
|
||||
for pop in 0..n_populations {
|
||||
let agents = (0..particles_per_grid)
|
||||
.map(|i| Agent::new(width, height, i / particles_per_grid, &mut rng, i)).collect();
|
||||
.map(|i| {
|
||||
Agent::new(width, height, pop, &mut rng, i)
|
||||
}).collect();
|
||||
grids.push(Grid::new(width, height, &mut rng, agents));
|
||||
|
||||
}
|
||||
|
||||
Model {
|
||||
grids,
|
||||
attraction_table,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user