Created
          June 2, 2018 10:33 
        
      - 
      
 - 
        
Save ryu1-1uyr/7d3e3f587b6829c57af038b95d79283b to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | firstCards = input().split(" ") | |
| field = [] | |
| unfair = {'J':11,'Q':12,'K':13,'A':14,'2':15,'unk':1,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9,'10':10} #ださいw | |
| # unfair[i] => 13 | |
| print(firstCards) | |
| #hikisuu 2 dotti tuyoi? | |
| def duel(x,field): | |
| if unfair[x] > unfair[field[-1]]: | |
| return True | |
| else: | |
| return False | |
| def FifteenGoToDeath(field): | |
| if field[-1] == '2': | |
| field.append('unk') | |
| else: | |
| pass | |
| for o in range(len(firstCards)): | |
| for i in firstCards: | |
| if not field: | |
| field.append(i) | |
| print((field)) | |
| continue | |
| FifteenGoToDeath(field) | |
| if duel(i,field): | |
| field.append(i) | |
| print((field)) | |
| print(field) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment