Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import random
- shit = [ "дерьмо", "говно", "сладкий хлеб", "говнище", "какашка", "какаха", "дерьмецо", "говнецо", "гавно", "фекалии" ]
- eat = [ "жрать", "хавать", "глотать", "проглотить", "съесть", "поесть", "пожрать", "сожрать", "есть", "кушать", "скушать", "покушать" ]
- mouth = [ "рот", "рта", "ротешник", "ротец", "ротик", "пасть", "хавальник", "хлебало", "ротан", "ротовую полость", "ротовой полости", "спермоприёмник" ]
- put = [ "положить", "засунуть", "запихнуть", "вставить", "вложить", "вбросить" ]
- take = [ "схватить", "взять", "подобрать", "поднять" ]
- ignored_words = [ "в", "внутрь" ]
- def strip_ignored(str) :
- arr = str.split(' ')
- res = []
- for x in arr:
- if not x in ignored_words:
- res.append(x)
- return ' '.join(res)
- def compare(alias_groups, str) :
- # одиночные команды
- if len(alias_groups) == 1:
- for w1 in alias_groups[0]:
- if w1 == str:
- return True
- wstr = str.split(' ')
- for x in range(0, len(wstr)):
- if len(wstr[x]) > 4:
- wstr[x] = wstr[x][:-1]
- str = ' '.join(wstr)
- for w1 in alias_groups[0]:
- w1tmp = w1
- if len(w1tmp) > 4:
- w1tmp = w1tmp[:-1]
- if w1tmp == str:
- return True
- # двойные команды
- if len(alias_groups) == 2:
- for w1 in alias_groups[0]:
- for w2 in alias_groups[1]:
- if w1 + " " + w2 == str:
- return True
- wstr = str.split(' ')
- for x in range(0, len(wstr)):
- if len(wstr[x]) > 4:
- wstr[x] = wstr[x][:-1]
- str = ' '.join(wstr)
- for w1 in alias_groups[0]:
- for w2 in alias_groups[1]:
- w1tmp = w1
- w2tmp = w2
- if len(w1tmp) > 4:
- w1tmp = w1tmp[:-1]
- if len(w2tmp) > 4:
- w2tmp = w2tmp[:-1]
- if w1tmp + " " + w2tmp == str:
- return True
- # тройные команды
- if len(alias_groups) == 3:
- for w1 in alias_groups[0]:
- for w2 in alias_groups[1]:
- for w3 in alias_groups[2]:
- if w1 + " " + w2 + " " + w3 == str:
- return True
- wstr = str.split(' ')
- for x in range(0, len(wstr)):
- if len(wstr[x]) > 4:
- wstr[x] = wstr[x][:-1]
- str = ' '.join(wstr)
- for w1 in alias_groups[0]:
- for w2 in alias_groups[1]:
- for w3 in alias_groups[2]:
- w1tmp = w1
- w2tmp = w2
- w3tmp = w3
- if len(w1tmp) > 4:
- w1tmp = w1tmp[:-1]
- if len(w2tmp) > 4:
- w2tmp = w2tmp[:-1]
- if len(w3tmp) > 4:
- w3tmp = w3tmp[:-1]
- if w1tmp + " " + w2tmp + " " + w3tmp == str:
- return True
- return False
- print "Поешь говна. А чтобы выйти Ctrl+C нажми."
- shit_eating = [ "Говнеца ты покушал", "Скушал фекалий ты", "Ты дерьма поел, лол)))" ]
- while True:
- user_input = raw_input('>')
- user_input = strip_ignored(user_input)
- if compare([eat, shit], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- elif compare([shit, eat], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- elif compare([take, shit, mouth], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- elif compare([take, mouth, shit], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- elif compare([put, shit, mouth], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- elif compare([put, mouth, shit], user_input):
- print shit_eating[random.randrange(0, len(shit_eating))]
- else:
- print "Команда не распознана."
Advertisement
Add Comment
Please, Sign In to add comment