Your task is to output all possible ways to end a game with a tie (all rows, columns, and diagonals are completely filled and do not have 3 X's or 3 O's, and there are exactly 5 X's and 4 O's in total) in Tic-Tac-Toe (assuming X goes first):
OXO XXO XOX OXX
XOX OOX XOX XOO
XOX XXO OXO OXX
XOX XOX OXX XXO
OOX XOO XOO OOX
XXO OXX XOX XOX
XOX OXX OXO XOO
XXO XXO OXX OXX
OXO OOX XOX XXO
OXO XXO XOX OOX
XXO OXX OXX XXO
XOX XOO OXO OXX
(It does not need to be arranged in the above way.)
Rules
- Output can be in any convenient format.
- You may use different characters to represent X and O as long as they are distinct.
- Standard loopholes are forbidden.
- This is code-golf, so the shortest code in bytes wins.
OXO/XOX/XOX
, isOXOXOXXOX
allowed? And what about010101101
,10101101
, or even269488385
? \$\endgroup\$269488385
represents? \$\endgroup\$OXOXOXXOXXXOOOXXXO
instead ofOXOXOXXOX XXOOOXXXO
) \$\endgroup\$