Yet another tic tac toe, implemented in a functional style in C++