Last minimax with two different functions for min and for max.