game of Hex for C++ class