Consider the average game of Tic Tac Toe or Noughts and Crosses. The game is played on a 3 by 3 two dimentional board. The game is played by two people and each person is allowed to only add one type of piece to the board - $\bigcirc$ or $\large\times$, where the person with the crosses always starts first, the players take turns, and whoever puts three pieces in a row (either horizontally,vertically or diagonally) first, wins. The fact that some games finish without filling the entire board is where this gets tricky.

So my questions are:

How many possible games of Tic Tac Toe, which finish at the ninth move, are there? (aka games that fill up the entire board.)

How many possible games of Tic Tac Toe, which finish before the ninth move, are there? (aka games that have at least 3 pieces of one type in a row 'stricked', where there are still empty spaces on the board.)

*Not that here games which are a rotations of other games count as different games.

game. $\endgroup$ – Eric Lippert Feb 20 '18 at 22:58