tic tac toe implementation in C++