Hex Game AI implementation C++