Update Robot.java

Added a method to calculate the traveled distance.