SHARE
TWEET

Untitled

a guest Oct 12th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. y = ('2♣', '4♣', '3♣', '5♣', '6♣')
  2. a = y[0]
  3. b = y[1]
  4. c = y[2]
  5. d = y[3]
  6. e = y[4]
  7.  
  8. an = a[0]
  9. am = a[1]
  10. bn = b[0]
  11. bm = b[1]
  12. cn = c[0]
  13. cm = c[1]
  14. dn = d[0]
  15. dm = d[1]
  16. en = e[0]
  17. em = e[1]
  18.  
  19. # ♣♦♥♠
  20.  
  21. def numbriteks(essa):
  22.     if essa == "J":
  23.         essa = 11
  24.         return essa
  25.     elif essa == "Q":
  26.         essa = 12
  27.         return essa
  28.     elif essa == "K":
  29.         essa = 13
  30.         return essa
  31.     elif essa == "A":
  32.         essa = 14
  33.         return essa
  34.     else:
  35.         return int(essa)
  36.  
  37. def mastid(testsa):
  38.     if testsa == "♣":
  39.         testsa = 1
  40.         return testsa
  41.     elif testsa == "♦":
  42.         testsa = 2
  43.         return testsa
  44.     elif testsa == "♥":
  45.         testsa = 3
  46.         return testsa
  47.     elif testsa == "♠":
  48.         testsa = 4
  49.         return testsa
  50.  
  51. an = numbriteks(an)
  52. bn = numbriteks(bn)
  53. cn = numbriteks(cn)
  54. dn = numbriteks(dn)
  55. en = numbriteks(en)
  56.  
  57. am = mastid(am)
  58. bm = mastid(bm)
  59. cm = mastid(cm)
  60. dm = mastid(dm)
  61. em = mastid(em)
  62.  
  63. numbrilist = [an, bn, cn, dn, en]
  64. mastilist = [am, bm, cm, dm, em]
  65. seen = []
  66. paarid = []
  67. seen2 = []
  68. mitupaari = 0
  69. mitukolmikut = 0
  70. mitunelikut = 0
  71.  
  72. for i in numbrilist:
  73.     if i in seen:
  74.         paarid.append(i)
  75.        
  76.     else:
  77.         seen.append(i)
  78.  
  79. for i in paarid:
  80.     print(i)
  81.     if i in seen2:
  82.         mitukolmikut = 1
  83.         mitupaari = mitupaari - 1
  84.     else:
  85.         seen2.append(i)
  86.         mitupaari = mitupaari + 1
  87. print(paarid)
  88.  
  89.  
  90. if mitupaari == -1:
  91.     if mitukolmikut == 1:
  92.         mitunelikut = 1
  93.         mitukolmikut = 0
  94.  
  95. if mitupaari<0:
  96.     mitupaari = 0
  97.    
  98. mitufullhouse = 0
  99.  
  100. if mitupaari == 1 and mitukolmikut == 1:
  101.     mitufullhouse = 1
  102.     mitupaari = 0
  103.     mitukolmikut = 0
  104.    
  105. mituflushi = 0
  106. if am == bm and bm == cm and cm == dm and dm == em:
  107.     mituflushi = 1
  108.  
  109. numbrilist.sort()
  110. pak1 = numbrilist[0]
  111. pak2 = numbrilist[1]
  112. pak3 = numbrilist[2]
  113. pak4 = numbrilist[3]
  114. pak5 = numbrilist[4]
  115.  
  116. miturida = 0
  117.  
  118. if pak1 + 1 == pak2 and pak2 + 1 == pak3 and pak3 + 1 == pak4 and pak4 + 1 == pak5:
  119.     miturida = 1
RAW Paste Data
Top