Slight optimization. All 3 difficulty levels playable.

Added a slight optimization to speed up the heuristic
function. All 3 difficulty levels are now playable.