(self, move)
return hands_min == 1 and hands_max == 1
Checking if move will cause returning to start state - never-ending loop protection
Checking if move will cause returning to start state - never-ending loop protection
Checking if move will cause returning to start state - never - ending loop protection
def back_to_startstate(self, move):
        """
        Checking if move will cause returning to start state - never-ending loop protection
        """
        nextstate = self.copy()
        nextstate.make_move(move)
        hands_min = min([min(nextstate.hands[i]) for i in range(self.numplayers)])
        hands_max = max([max(nextstate.hands[i]) for i in range(self.numplayers)])
        return hands_min == 1 and hands_max == 1
def back_to_startstate ( self , move ) : nextstate = self . copy ( ) nextstate . make_move ( move ) hands_min = min ( [ min ( nextstate . hands [ i ] ) for i in range ( self . numplayers ) ] ) hands_max = max ( [ max ( nextstate . hands [ i ] ) for i in range ( self . numplayers ) ] ) return hands_min == 1 and hands_max == 1