Tic-Tac-Toe code