Change the path() block inside to any path you want (using movement blocks) and ensure that the position is recorded in the lists path x and path y often; the more often, the better.
For an AoPS class