minimax

-I think this is more along the lines of what minimax should do
-fixed some other bugs (lines 74-76)