Whether the robot can move in the given direction, without taking into account the unit's movement heat. Takes into account only the map terrain, positions of other robots, and the edge of the game map.
(&self, robot_id: UnitID, direction: Direction)
| 1008 | /// account the unit's movement heat. Takes into account only the map |
| 1009 | /// terrain, positions of other robots, and the edge of the game map. |
| 1010 | pub fn can_move(&self, robot_id: UnitID, direction: Direction) -> bool { |
| 1011 | self.ok_if_can_move(robot_id, direction).is_ok() |
| 1012 | } |
| 1013 | |
| 1014 | /// * NoSuchUnit - the unit does not exist (inside the vision range). |
| 1015 | /// * TeamNotAllowed - the unit is not on the current player's team. |
no test coverage detected