All the units on your team. Does not include units in space.
(&self)
| 311 | /// All the units on your team. |
| 312 | /// Does not include units in space. |
| 313 | pub fn my_units(&self) -> Vec<Unit> { |
| 314 | let my_team = self.world.team(); |
| 315 | self.world.units().iter().filter(|u| u.team() == my_team).map(|u| u.clone()).collect() |
| 316 | } |
| 317 | |
| 318 | /// All the units within the vision range, by ID. |
| 319 | /// Does not include units in space. |