pseudo code for ttt game