home *** CD-ROM | disk | FTP | other *** search
- extern void object::Recharge2()
- {
- point start; // variable for initial pos.
- object item; // info. about power station
-
- start = position; // stores initial position
-
- item = radar(PowerStation); // looks for station
- goto(item.position); // goes to the power station
-
- while ( energyCell.energyLevel < 1 )
- {
- wait(1); // waits until recharged
- }
-
- goto(start); // comes back to initial pos.
- message("Recharge completed");
- }
-