Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import random
- shit = [ "дерьмо", "говно", "сладкий хлеб", "говнище", "какашка", "какаха", "дерьмецо", "говнецо", "гавно", "фекалии" ]
- eat = [ "жрать", "хавать", "глотать", "проглотить", "съесть", "поесть", "пожрать", "сожрать", "есть", "кушать", "скушать", "покушать" ]
- mouth = [ "рот", "рта", "ротешник", "ротец", "ротик", "пасть", "хавальник", "хлебало", "ротан", "ротовую полость", "ротовой полости", "спермоприёмник" ]
- put = [ "положить", "засунуть", "запихнуть", "вставить", "вложить", "вбросить" ]
- take = [ "схватить", "взять", "подобрать", "поднять" ]
- inside = [ "в", "вовнутрь", "внутрь" ]
- 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
- # четверные команды
- if len(alias_groups) == 4:
- for w1 in alias_groups[0]:
- for w2 in alias_groups[1]:
- for w3 in alias_groups[2]:
- for w4 in alias_groups[3]:
- if w1 + " " + w2 + " " + w3 + " " + w4 == 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]:
- for w4 in alias_groups[3]:
- w1tmp = w1
- w2tmp = w2
- w3tmp = w3
- w4tmp = w4
- if len(w1tmp) > 4:
- w1tmp = w1tmp[:-1]
- if len(w2tmp) > 4:
- w2tmp = w2tmp[:-1]
- if len(w3tmp) > 4:
- w3tmp = w3tmp[:-1]
- if len(w4tmp) > 4:
- w4tmp = w4tmp[:-1]
- if w1tmp + " " + w2tmp + " " + w3tmp + " " + w4tmp == str:
- return True
- return False
- def multi_compare(arrs, str):
- for arr in arrs:
- if compare(arr, str):
- return True
- str = strip_ignored(str)
- for arr in arrs:
- if compare(arr, str):
- return True
- return False
- print "Поешь говна. А чтобы выйти Ctrl+C нажми."
- shit_eating = [ "Говнеца ты покушал", "Скушал фекалий ты", "Ты дерьма поел, лол)))" ]
- while True:
- user_input = raw_input('>')
- if multi_compare([
- [eat, shit],
- [shit, eat],
- [put, shit, inside, mouth],
- [take, mouth, shit],
- [take, mouth, shit],
- [put, shit, mouth],
- [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