Made a more complex version that takes into account the other robots