GamePlayer: Refactored getFrontier and TreeSearch a bit