Advertisement
furas

combo i table

Aug 28th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.58 KB | None | 0 0
  1. combo = [(660, (32, 32, 31), (9, 8, 8)), (660, (32, 32, 31), (9, 8, 8)), (660, (32, 32, 31), (9, 8, 8)), (636, (32, 32, 30), (9, 8, 8)), (636, (32, 32, 30), (9, 8, 8)), (636, (32, 32, 30), (9, 8, 8)), (636, (32, 31, 31), (9, 8, 8)), (636, (32, 31, 31), (9, 8, 8)), (636, (32, 31, 31), (9, 8, 8))]
  2.  
  3. table1 = ((12,27),(13,27),(14,27),(9,27),(8,32),(12,27),(8,27),(13,26))
  4. table2 = ((12,27),(14,27),(9,32) ,(10,28),(8,31),(10,32),(9,28),(9,30))
  5. table3 = ((26,30),(26,26),(26,31))
  6.  
  7. # kolejnosci wedlug elementow z combo
  8.  
  9. for j, a, b in combo:
  10.  
  11.     for x, y in table1:
  12.       if (x in a or y in a) and (x in b or y in b):
  13.          print j, a, b, 'table1', x, y
  14.  
  15.     for x, y in table2:
  16.       if (x in a or y in a) and (x in b or y in b):
  17.          print j, a, b, 'table2', x, y
  18.  
  19.     for x, y in table3:
  20.       if (x in a or y in a) and (x in b or y in b):
  21.          print j, a, b, 'table3', x, y
  22.          
  23. print '---'
  24.  
  25. # kolejnosci wedlug tablic
  26.  
  27. for x, y in table1:
  28.     for j, a, b in combo:
  29.       if (x in a or y in a) and (x in b or y in b):
  30.          print 'table1', j, a, b, x, y
  31.  
  32. for x, y in table2:
  33.     for j, a, b in combo:
  34.       if (x in a or y in a) and (x in b or y in b):
  35.          print 'table2', j, a, b, x, y
  36.  
  37. for x, y in table3:
  38.     for j, a, b in combo:
  39.       if (x in a or y in a) and (x in b or y in b):
  40.          print 'table3', j, a, b, x, y
  41.  
  42. # 660 (32, 32, 31) (9, 8, 8) table1 8 32
  43. # 660 (32, 32, 31) (9, 8, 8) table2 9 32
  44. # 660 (32, 32, 31) (9, 8, 8) table2 8 31
  45. # 660 (32, 32, 31) (9, 8, 8) table1 8 32
  46. # 660 (32, 32, 31) (9, 8, 8) table2 9 32
  47. # 660 (32, 32, 31) (9, 8, 8) table2 8 31
  48. # 660 (32, 32, 31) (9, 8, 8) table1 8 32
  49. # 660 (32, 32, 31) (9, 8, 8) table2 9 32
  50. # 660 (32, 32, 31) (9, 8, 8) table2 8 31
  51. # 636 (32, 32, 30) (9, 8, 8) table1 8 32
  52. # 636 (32, 32, 30) (9, 8, 8) table2 9 32
  53. # 636 (32, 32, 30) (9, 8, 8) table2 9 30
  54. # 636 (32, 32, 30) (9, 8, 8) table1 8 32
  55. # 636 (32, 32, 30) (9, 8, 8) table2 9 32
  56. # 636 (32, 32, 30) (9, 8, 8) table2 9 30
  57. # 636 (32, 32, 30) (9, 8, 8) table1 8 32
  58. # 636 (32, 32, 30) (9, 8, 8) table2 9 32
  59. # 636 (32, 32, 30) (9, 8, 8) table2 9 30
  60. # 636 (32, 31, 31) (9, 8, 8) table1 8 32
  61. # 636 (32, 31, 31) (9, 8, 8) table2 9 32
  62. # 636 (32, 31, 31) (9, 8, 8) table2 8 31
  63. # 636 (32, 31, 31) (9, 8, 8) table1 8 32
  64. # 636 (32, 31, 31) (9, 8, 8) table2 9 32
  65. # 636 (32, 31, 31) (9, 8, 8) table2 8 31
  66. # 636 (32, 31, 31) (9, 8, 8) table1 8 32
  67. # 636 (32, 31, 31) (9, 8, 8) table2 9 32
  68. # 636 (32, 31, 31) (9, 8, 8) table2 8 31
  69. # ---
  70. # table1 660 (32, 32, 31) (9, 8, 8) 8 32
  71. # table1 660 (32, 32, 31) (9, 8, 8) 8 32
  72. # table1 660 (32, 32, 31) (9, 8, 8) 8 32
  73. # table1 636 (32, 32, 30) (9, 8, 8) 8 32
  74. # table1 636 (32, 32, 30) (9, 8, 8) 8 32
  75. # table1 636 (32, 32, 30) (9, 8, 8) 8 32
  76. # table1 636 (32, 31, 31) (9, 8, 8) 8 32
  77. # table1 636 (32, 31, 31) (9, 8, 8) 8 32
  78. # table1 636 (32, 31, 31) (9, 8, 8) 8 32
  79. # table2 660 (32, 32, 31) (9, 8, 8) 9 32
  80. # table2 660 (32, 32, 31) (9, 8, 8) 9 32
  81. # table2 660 (32, 32, 31) (9, 8, 8) 9 32
  82. # table2 636 (32, 32, 30) (9, 8, 8) 9 32
  83. # table2 636 (32, 32, 30) (9, 8, 8) 9 32
  84. # table2 636 (32, 32, 30) (9, 8, 8) 9 32
  85. # table2 636 (32, 31, 31) (9, 8, 8) 9 32
  86. # table2 636 (32, 31, 31) (9, 8, 8) 9 32
  87. # table2 636 (32, 31, 31) (9, 8, 8) 9 32
  88. # table2 660 (32, 32, 31) (9, 8, 8) 8 31
  89. # table2 660 (32, 32, 31) (9, 8, 8) 8 31
  90. # table2 660 (32, 32, 31) (9, 8, 8) 8 31
  91. # table2 636 (32, 31, 31) (9, 8, 8) 8 31
  92. # table2 636 (32, 31, 31) (9, 8, 8) 8 31
  93. # table2 636 (32, 31, 31) (9, 8, 8) 8 31
  94. # table2 636 (32, 32, 30) (9, 8, 8) 9 30
  95. # table2 636 (32, 32, 30) (9, 8, 8) 9 30
  96. # table2 636 (32, 32, 30) (9, 8, 8) 9 30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement