updated TicTacToe sample code