find the shortest path from (sx,sy) to (dx,dy), using PosOk(PosOkArg,x,y) to check that each step is a valid position.
Store the step directions (see path_directions) in path, which must have room for 24 steps
Definition at line 51 of file path.cpp.