intention is dote

This commit is contained in:
vova-rs committed 2026-05-26 12:28:00 +03:00
1 parent 580894ed0a
commit c6b1b68572
6 files changed
+73 -19

No files matched your search

+18 -1
View File
@@ -1,3 +1,5 @@
use smallvec::{SmallVec, smallvec};
mod grid;
use std::sync::{Arc, Mutex};
@@ -9,6 +11,9 @@ pub use agent::Agent;
mod m_container;
pub use m_container::*;
mod intention;
pub use intention::*;
pub struct World{
grid: TorusGrid<bool>,
agents: MagicContainer<Agent>,
@@ -47,6 +52,18 @@ impl World {
pub fn get_a_grid(&self) -> &TorusGrid<Option<usize>>{
&self.a_grid
}
// pub fn
pub fn update(&mut self){
let mut plane_of_intentions: TorusGrid<SmallVec<[LinkIntention<Intention>; 4]>> = TorusGrid::new(SmallVec::new(), self.size.clone());
let mut local_it: Vec<LinkIntention<LocalItentoin>> = Vec::new();
for i in 0..self.agents.len() {
if let Some(ag) = self.agents.get(i) {
let cell = self.grid.get_wrap(ag.get_pos());
}
}
}
}