relase local inteintoon
This commit is contained in:
1 parent
d4cfb25c8d
commit
93b0c65fed
1 file changed
+15
@@ -71,5 +71,20 @@ impl World {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for i in 0..local_it.len() {
|
||||||
|
match local_it[i].it {
|
||||||
|
LocalItentoin::Rotate(r) => {
|
||||||
|
if let Some(ag) = self.agents.get_mut(local_it[i].lin) {
|
||||||
|
ag.rotate(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LocalItentoin::SwapCell(cell) => {
|
||||||
|
let g = self.get_mut_grid();
|
||||||
|
if let Some(s) = g.get_mut(cell) {
|
||||||
|
*s = !*s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user