You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
385 B
16 lines
385 B
use gntag::agent::{Agent, Position, SimpleAgent};
|
|
use gntag::world::ActualWorld;
|
|
|
|
fn main() {
|
|
let mut agents: Vec<(_, Box<dyn Agent>)> = vec![];
|
|
for x in 0..5 {
|
|
for y in 0..5 {
|
|
agents.push(((x, y).into(), Box::new(SimpleAgent)));
|
|
}
|
|
}
|
|
let mut world = ActualWorld::new((80, 40).into(), agents);
|
|
loop {
|
|
world.do_step();
|
|
println!("{}", world.tagged);
|
|
}
|
|
}
|