Redo minimax in python