Modified tictactoe()