home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
P_ROBO31.ZIP
/
NOVA.PR
< prev
next >
Wrap
Text File
|
1989-10-31
|
4KB
|
163 lines
(**************************************************************************)
(* W A R N I N G *)
(* *)
(* This Robot has NOT been designed to take advantage of the advanced *)
(* features of P-ROBOTS, such as, Shields, Fuel, Teams or Obstructions. *)
(**************************************************************************)
PROCEDURE Nova;
{ Team Robot NOVA. Designed and programmed by Mark Dash and Frank Yetnick
Travels in a star pattern at top speed. Avoids corners
while still maintaining a long path.
}
VAR Dir : Integer;
Ang : Integer;
Dist : Integer;
Width : Integer;
Incr : Integer;
BEGIN { Main routine }
Dir := 0;
Width := 10;
Incr := 20;
Ang := Angle_To(1000, 1000);
REPEAT { Main loop }
WHILE (loc_y < 900) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(500, 0);
WHILE (speed > 40) DO Ang := Angle_To(500, 0);
WHILE (loc_y > 200) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(0, 1000);
WHILE (speed > 40) DO Ang := Angle_To(0, 1000);
WHILE (loc_x > 100) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(1000, 500);
WHILE (speed > 40) DO Ang := Angle_To(1000, 500);
WHILE (loc_x < 800) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(0, 0);
WHILE (speed > 40) DO Ang := Angle_To(0, 0);
WHILE (loc_y > 100) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(500, 1000);
WHILE (speed > 40) DO Ang := Angle_To(500, 1000);
WHILE (loc_y < 800) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(1000, 0);
WHILE (speed > 40) DO Ang := Angle_To(1000, 0);
WHILE (loc_x < 900) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(0, 500);
WHILE (speed > 40) DO Ang := Angle_To(0, 500);
WHILE (loc_x > 200) DO
BEGIN
DRIVE(Ang, 100);
Dist := SCAN(Dir, Width);
IF Dist > 50 THEN
BEGIN
CANNON(Dir, Dist);
CANNON(Dir, Dist);
END
ELSE
Dir := Dir+Incr;
END;
DRIVE(Ang, 40);
Ang := Angle_To(1000, 1000);
WHILE (speed > 40) DO Ang := Angle_To(1000, 1000);
UNTIL DEAD;
END; { End Nova Main }