A Tic-Tac-Toe game can at the most have 9 moves.
The logic for player moves is as follows:
Each player goes by pressing on an empty space on the board to mark it
with an X or an O. The first person to get 3 X’s or O’s in a row, vertically,
horizontally or diagonally, wins.