ajtran303 / hexagrams

Explore the 64 ancient hexagrams as a data structure of nested collections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hexagrams.rb

Explore the 64 Hexagrams as a data structure of nested collections.

Setup

git clone git@github.com:ajtran303/hexagrams.git
cd hexagrams
bundle install

# try the program
ruby runner.rb -r

Usage

  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)

Screenshots

Screenshot of Hexagrams 19 and 20, named Approach and Contemplation.

Screenshot of Hexagram 2, named Receptive Earth.

awesome_print gem

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!

What are hexagrams?

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.

About

Explore the 64 ancient hexagrams as a data structure of nested collections


Languages

Language:Ruby 100.0%