Affinity interview question

Implement Tic Tac Toe in a game loop