Solution for resolving tictactoes boards