Beispiel #1
0
 def poker(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     for i in valores:
         if valores.count(i) == 4:
             return True
     return False
Beispiel #2
0
 def trio(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     rep = [valores.count(x) for x in set(valores)]
     return 3 in rep and 2 not in rep
Beispiel #3
0
 def full(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     norep = set(valores)
     repeti = [valores.count(x) for x in norep]
     return repeti.count(2) == 1 and repeti.count(3) == 1
Beispiel #4
0
 def pareja(self):
     valores = {carta.pasaravalor() for carta in self.lista}
     return len(valores) == 4
Beispiel #5
0
 def doblepareja(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     setvalores = set(valores)
     return [valores.count(i) for i in setvalores].count(2) == 2
Beispiel #6
0
 def poker(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     for i in valores:
         if valores.count(i) == 4:
             return True
     return False
Beispiel #7
0
 def full(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     norep = set(valores)
     repeti = [valores.count(x) for x in norep]
     return repeti.count(2) == 1 and repeti.count(3) == 1
Beispiel #8
0
 def trio(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     rep = [valores.count(x) for x in set(valores)]
     return 3 in rep and 2 not in rep
Beispiel #9
0
 def doblepareja(self):
     valores = [carta.pasaravalor() for carta in self.lista]
     setvalores = set(valores)
     return [valores.count(i) for i in setvalores].count(2) == 2
Beispiel #10
0
 def pareja(self):
     valores = {carta.pasaravalor() for carta in self.lista}
     return len(valores) == 4