iching-shifa 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -232,6 +232,17 @@ function buildYaoString(upperNum, lowerNum, dongYao) {
232
232
  }
233
233
  return yaoArray.join("");
234
234
  }
235
+ function lueshifaOnce(groupSize) {
236
+ const left = 1 + Math.floor(Math.random() * 48);
237
+ const remainder = left % groupSize;
238
+ return remainder === 0 ? 1 : remainder + 1;
239
+ }
240
+ function lueshifa() {
241
+ const lowerNum = lueshifaOnce(8);
242
+ const upperNum = lueshifaOnce(8);
243
+ const dongYao = lueshifaOnce(6);
244
+ return buildYaoString(upperNum, lowerNum, dongYao);
245
+ }
235
246
  function threeNumberQiGua(num1, num2, num3) {
236
247
  const upperNum = modWithZero(num1, 8);
237
248
  const lowerNum = modWithZero(num2, 8);
@@ -5903,6 +5914,7 @@ exports.getMovingYaoPositions = getMovingYaoPositions;
5903
5914
  exports.getWuXingRelation = getWuXingRelation;
5904
5915
  exports.getZhiGua = getZhiGua;
5905
5916
  exports.isMovingYao = isMovingYao;
5917
+ exports.lueshifa = lueshifa;
5906
5918
  exports.manualQiGua = manualQiGua;
5907
5919
  exports.numberArrayQiGua = numberArrayQiGua;
5908
5920
  exports.rotateList = rotateList;