| 161 | 161 |
f"辅预言:{support_indicate}")
|
| 162 | 162 |
|
| 163 | 163 |
def predict(self, wish: str, pray: str):
|
| 164 | |
today = datetime.datetime.now().__format__("%Y%m%d")
|
| 165 | |
time_seed_str = wish + pray + today
|
|
164 |
'''
|
|
165 |
Divination.
|
|
166 |
|
|
167 |
Args:
|
|
168 |
wish(str)
|
|
169 |
pray(str)
|
|
170 |
|
|
171 |
Returns:
|
|
172 |
turn_symbol_desc(str)
|
|
173 |
main_indicate(str)
|
|
174 |
support_indicate(str)
|
|
175 |
'''
|
|
176 |
today = datetime.datetime.now().__format__("%Y%m%d")
|
|
177 |
time_seed_str = wish + pray + today
|
|
178 |
self._set_random_seed(time_seed_str)
|
|
179 |
|
|
180 |
# 生成本卦和变卦
|
|
181 |
origin_hexagram = self._gen_origin_hexagram()
|
|
182 |
support_hexagram = self._gen_support_hexagram(origin_hexagram)
|
|
183 |
origin_hexagram_dict_key = self._get_hexagram_dict_key(origin_hexagram)
|
|
184 |
support_hexagram_dict_key = self._get_hexagram_dict_key(support_hexagram)
|
|
185 |
turn_symbol_desc, main_indicate, support_indicate = self._parser_hexagram(origin_hexagram, support_hexagram)
|
|
186 |
|
|
187 |
return turn_symbol_desc, main_indicate, support_indicate
|
|
188 |
|
| 166 | 189 |
|
| 167 | 190 |
if __name__ == "__main__":
|
| 168 | 191 |
obj = YiProgram()
|