()
| 118 | } { |
| 119 | const tosses = Array.from({ length: 3 }, () => pickRandomToss()); |
| 120 | const combination = tosses.join(""); |
| 121 | const jiaci = JIACI_MAP[combination] || "未找到对应的卦辞。"; |
| 122 | const interpretation = getInterpretation(jiaci); |
| 123 | return { tosses, combination, jiaci, interpretation }; |
| 124 | } |
| 125 | |
| 126 | function formatTossLine(index: number, toss?: TossResult): string { |
| 127 | if (!toss) { |
| 128 | return `第${index + 1}投:…`; |
| 129 | } |
| 130 | |
| 131 | const symbol = TOSS_SYMBOLS[toss]; |
| 132 | return `第${index + 1}投:${toss} ${symbol}`; |
| 133 | } |
| 134 |
no test coverage detected