Tie-breaker for A*.

http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#breaking-ties