Andrey, when you enumerate the 10!/2! paths of length 8 then you have also enumerated all shorter paths along the way. Hence it is sufficient to do the high score check after each and every step instead of only after step 8; everything else can remain the same.
Since the check involves only a multiplication and a comparison it is essentially free, and the complexity is dominated by the enumeration of the 10!/2! paths of length 8.