completed doBattle() method