How would you write a code that implements Tic Tac Toe?

Technical