Guest User

Untitled

a guest
Oct 1st, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. import random
  2.  
  3. print('Крутите барабан')
  4.  
  5. def super_bot() :
  6. botcurrentPoint = 0
  7. while botcurrentPoint <=17 :
  8. botcurrentPoint += random.randint(2,11)
  9. if botcurrentPoint > 21:
  10. print('Вау как я проиграл!!(глупый бот)')
  11. print('Счет бота: ', botcurrentPoint)
  12. return botcurrentPoint
  13.  
  14. continueGame = True
  15. totalAmount = 0
  16.  
  17. while continueGame == True:
  18. currentPoint = random.randint(2,11)
  19. totalAmount += currentPoint
  20. print('Текущая карта:', currentPoint)
  21. print('Текущее количество очков:', totalAmount)
  22.  
  23. if totalAmount >= 21:
  24. continueGame = False
  25. else:
  26. answer = input('Хотите ли Вы взять еще карту?')
  27. if answer == 'Да':
  28. continueGame = True
  29. else:
  30. continueGame = False
  31.  
  32. botAmount = super_bot()
  33. if totalAmount == 21:
  34. print('Press f to pay respect')
  35. elif totalAmount > 21:
  36. print('Японский городовой этого казино!Как в казино колода в другом порядке разложена может быть!')
  37. elif botAmount > totalAmount:
  38. print('Ты проиграл, мешок с костями')
Advertisement
Add Comment
Please, Sign In to add comment