(self, who=None)
return any(wins)
Has the opponent "three in line ?"
Has the opponent "three in line ?"
Has the opponent three in line ?
def lose(self, who=None):
        """ Has the opponent "three in line ?" """
        if who is None:
            who = self.opponent_index
        wins = [
            all([(self.board[c - 1] == who) for c in line]) for line in self.WIN_LINES
        ]
        return any(wins)
def lose ( self , who = None ) : if who is None : who = self . opponent_index wins = [ all ( [ ( self . board [ c - 1 ] == who ) for c in line ] ) for line in self . WIN_LINES ] return any ( wins )