Rover problem, implemented in different languages