Moving the ship only back and forth won't get us far. We should be able to change the direction by rotating the ship to the left or right as well.
After implementing the previous requirement, this one should be very easy since it can follow the same logic. The Location helper class already contains the turnLeft and turnRight methods that perform exactly what is required by this requirement. All we need to do is integrate them into the Ship class.