/// <summary> /// Tests collision between the specified robot and all walls and other robots in the CurrentEnvironment. /// </summary> public override bool robotCollide(Robot robot) { foreach (Wall wall in Domain.walls) { if (EngineUtilities.collide(robot, wall)) { return(true); } } if (!AgentCollide) { return(false); } foreach (Robot otherRobot in Robots) { if (robot == otherRobot) { continue; } if (EngineUtilities.collide(robot, otherRobot)) { return(true); } } return(false); }
public static bool collide(Robot a, Wall b) { return(EngineUtilities.collide(b, a)); }