Extract function in tictactoe.primer