home *** CD-ROM | disk | FTP | other *** search
- { ****** AIMLESS ******}
- { This robot wanders around in a random direction (increments of 45'),
- { shooting at tanks if it finds one. It does not, however, lock onto a }
- { tank, making it relatively harmless and easy to beat. }
-
-
- REPEAT
- {** Pick a random starting direction, in increments of 45' **}
- a=RND(8)
- a:=a*45
- SHIELD OFF
- RADAR a
-
- {** Did we spot a tank **}
- IF OBJECT=TANK THEN
- TURRET a {** Yes, so turn gun towards it **}
- FIRE DISTANCE {** And blast the blighter **}
- ELSE
- {** Otherwise, if it's a missile then shield up for a while **}
- IF OBJECT=MISSILE THEN
- DO 10
- SHIELD ON
- LOOP
- ENDIF
- ENDIF
-
- {** Turn to face the object and move off **}
- ROTATE a
- MOVE DISTANCE-20
- FOREVER
-