A nice subtle problem which had me stumped for a while. You have two statements whose results are not what you expect, due to the fact that postfix increment occurs
before indirection. In your
moveXXX
functions you need to make the following changes:
(*T)++;
(*H)++;
See
this page[
^] for details of operator precedence and associativity.
I think you may need to look at your randomisation as the Tortoise seems to be winning all the time.