/// <summary> /// The Cannon() function fires a missile heading a specified range and direction. /// Cannon() returns 1 (true) if a missile was fired, or 0 (false) if the cannon is reloading. /// Degree is forced into the range 0-359 as in Scan() and Drive(). /// Range can be 0-700, with greater ranges truncated to 700. /// /// Examples: /// degree = 45; // set a direction to test /// if ((range=Scan(robot, degree, 2)) > 0) // see if a target is there /// Cannon(robot, degree, range); // fire a missile /// </summary> /// <param name="robot"></param> /// <param name="degree"></param> /// <param name="range"></param> /// <returns></returns> public static bool Cannon(Robot robot, int degree, int range) { return(EngineInstance.FireCannon(robot, degree, range)); }