rewrote get_best_move()

split into two functions, one for AI and one for opponent.  This fixes a few bugs, such as crashing when the tree reaches a dead end.  I also believe that the previous version did not correctly predict the opponent's move.