Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 4
0
 def pareja(self):
     valores = {carta.pasaravalor() for carta in self.lista}
     return len(valores) == 4
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 10
0
 def pareja(self):
     valores = {carta.pasaravalor() for carta in self.lista}
     return len(valores) == 4