Refactor minimax by adding min and max methods