䷼ Inner Truth

This commit is contained in:
nik gaffney 2022-06-19 10:17:54 +02:00
parent 992f53ae2b
commit 54f19e2dcb

View file

@ -570,6 +570,9 @@ Depending on the context and circumstance some methods may be more suitable.
see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
(interactive)
(let ((method-function
(when (not method)
(let ((method i-ching-divination-method))
(message "casting hexagram using: %s" method)
(pcase method
;; the casting method should return a hexagram (or changing hexagram)
('3-coins #'i-ching--three-coins)
@ -579,7 +582,7 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
('bagua (message "unimplemented"))
('cheezburger (message "LOL"))
(_
#'i-ching--random-number))))
#'i-ching--random-number))))))
(when method-function
(let* ((line-1 (funcall method-function))
(line-2 (funcall method-function))
@ -668,7 +671,7 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
(defun i-ching-random (n &optional source)
"Return a random integer from 1 to N inclusive (possibly with a specific SOURCE of randomness)."
(when (not source) (setq source i-ching-randomness-source))
(message "using: %s" source)
(message "randomness source: %s" source)
(pcase source
('quantum (pcase n
(64 (i-ching-q64))