䷼ Inner Truth
This commit is contained in:
parent
992f53ae2b
commit
54f19e2dcb
1 changed files with 14 additions and 11 deletions
25
i-ching.el
25
i-ching.el
|
@ -570,16 +570,19 @@ Depending on the context and circumstance some methods may be more suitable.
|
||||||
see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
|
see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((method-function
|
(let ((method-function
|
||||||
(pcase method
|
(when (not method)
|
||||||
;; the casting method should return a hexagram (or changing hexagram)
|
(let ((method i-ching-divination-method))
|
||||||
('3-coins #'i-ching--three-coins)
|
(message "casting hexagram using: %s" method)
|
||||||
('yarrow-stalks #'i-ching--yarrow-stalks)
|
(pcase method
|
||||||
('6-bit #'i-ching--random-number)
|
;; the casting method should return a hexagram (or changing hexagram)
|
||||||
('4-coins (message "unimplemented"))
|
('3-coins #'i-ching--three-coins)
|
||||||
('bagua (message "unimplemented"))
|
('yarrow-stalks #'i-ching--yarrow-stalks)
|
||||||
('cheezburger (message "LOL"))
|
('6-bit #'i-ching--random-number)
|
||||||
(_
|
('4-coins (message "unimplemented"))
|
||||||
#'i-ching--random-number))))
|
('bagua (message "unimplemented"))
|
||||||
|
('cheezburger (message "LOL"))
|
||||||
|
(_
|
||||||
|
#'i-ching--random-number))))))
|
||||||
(when method-function
|
(when method-function
|
||||||
(let* ((line-1 (funcall method-function))
|
(let* ((line-1 (funcall method-function))
|
||||||
(line-2 (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)
|
(defun i-ching-random (n &optional source)
|
||||||
"Return a random integer from 1 to N inclusive (possibly with a specific SOURCE of randomness)."
|
"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))
|
(when (not source) (setq source i-ching-randomness-source))
|
||||||
(message "using: %s" source)
|
(message "randomness source: %s" source)
|
||||||
(pcase source
|
(pcase source
|
||||||
('quantum (pcase n
|
('quantum (pcase n
|
||||||
(64 (i-ching-q64))
|
(64 (i-ching-q64))
|
||||||
|
|
Loading…
Reference in a new issue