You will create a 3×3 grid where two players will take turns marking the grid with cross and circle symbols. The first player to get three marks in a horizontal, vertical, or diagonal row wins the game.
Hence, before you start writing any code, break down the flow of the game into logical steps first. For a simple game like Tic Tac Toe, I find it helpful to draw a small flow chart to visualize the different outcomes of the game. When I can see the flow on paper, it’s easier to start writing actual code.