Added a heuristic and refactored gametree code to allow easier swapping of heuristics