Simple Tic-Tac-Toe Algorithm