Explore the 64 Hexagrams as a data structure of nested collections.
git clone [email protected]:ajtran303/hexagrams.git
cd hexagrams
bundle install
# try the program
ruby runner.rb -r
usage: $ ruby runner.rb [-h|-r|-a|NUMBER]
-h Display this message
-r Display random hexagram
-a Display all hexagrams
NUMBER Display numbered hexagram (1-64)
Pretty print your Ruby objects with style
-- in full color and with proper indentation
I highly recommend checking out the awesome_print documentation!
I use it to wrap my head around giant data structures!
A hexagram is a symbol that represents life experiences. They have many qualities, such as numbers, names, and trigrams.
A trigram is a symbol that corresponds to an aspect of nature. Two trigrams combine to make one hexagram.
Hexagrams are determined and generated (usually drawn) by manipulating numbers. There is usually an aspect of "randomness" to the numbers chosen.
There are 64 hexagrams and they come from the I-Ching, an ancient Chinese book ("The Book of Change[s]").
If you want to read more about the I-Ching, here is a good article to start with.
There are many translations of the I-Ching available online if you want to check those out (nudge nudge).
There are many ways to consult and interpret the Book of Changes -- it is common to consult the I-Ching as an oracle for divining the future.