The first stage (moving forward):
a) Mark the source hex as "0";
b) Mark all the empty hexes adjacent to the hex marked as "0" as "1";
c) Mark all the empty (and, of course, without marks) hexes adjacent to the hexes marked as "1" as "2", and so on.
d) Repeat this procedure until the destination hex is marked.
As you can see, a "mark" means the distance (by ground) from the source hex.
The second stage (moving backward):
a) n := [the mark of the destination hex];
b) Among the hexes adjacent to the hex marked as "n", choose the one marked as "n-1" with the highest priority value (see the picture below).
This hex will be the second to last in the chain of hexes from the source hex to the destination one.
c) n:=n-1;
d) Repeat b), c) until n=0.
As a result, you will find the whole chain of hexes from the source to the destination hex.
I understand that this theory is of little practical use, but it's a good idea to create a computer program based on this theory that could imitate real battles.
The theory of 2-hex ground moving creatures is nearly the same. All the distances should be measured from the creature's head. Hexes where heads of creatures cannot stand must be marked as "*" (except the hex left [for attackers] / right [for defenders] to the source hex [head hex]. Such a hex should be marked as "1"). Hexes where neither heads nor tails of creatures can stand must be marked as "N". The second stage is the same absolutely.
The priority of hexes is as follows:
--4--3--
5--UN--2
--6--1--
You can also find the rules for attacking with fire/acid breath (dragons, phoenixes), as well as the rule that allows you to determine whether a squad will turn before attacking.