extern void object::Recharge3() { point start; // variable for initial pos. object item; // info. about power station start = position; // store initial position item = radar(PowerCaptor); // look for station goto(item.position); // go to the power station while ( energyCell.energyLevel < 1 ) { wait(1); // wait until recharged } goto(start); // go back to initial pos. message("Recharge completed"); }