Tic-tac-toe version 2 using algorithm discussed in class.