Search the forums and you will some code relating to Tic Tac Toe.