tictactoe snippet