changed minimax to do lookahead by move, rather than calculating all moves