This is the 23rd day of my participation in Gwen Challenge

preface

Yesterday touch fish, is reviewing the ghost novel, whenever Hu Bayi mentioned sixteen words Yin and Yang feng shui secretary will arouse the idea that I want to learn fortune telling.

When people watch various kinds of movies and TV dramas or joint fortune-telling scenes, fortune-telling masters usually pinch their fingers and recite sounds as if they are calculating something. I wonder how they get the results.

After surfing the Internet, I found a divination method that can be conveniently calculated — small Six nonons.

Divination method — Small six rens

Small liu Ren also known as zhuge Liang horse before class, small liu Ren’s search method: with da ‘an as the starting point clockwise check. According to the lunar calendar from the first day of the month daan clockwise to the month you want to check, then from the beginning of the month clockwise to the day you want to check, you know the day is good or bad. If you check the hour, check each hour clockwise from this day on. For example, the fifth day of June in the lunar calendar; June is the empty moon, the fifth day is the day, the hour is to linger.

It seems like a lot of trouble, but the logic is pretty simple. If you look at the picture below, you can see how it works out in a few words.

['1. The top'.'(2);.'3. Speed xi'.'4. Red mouth'.'5. He'.'6. Empty wu']
Copy the code

There are six results, each corresponding to the interpretation of divination.

  1. Get the year, month, day or a random number by being in the right place at the right time.
  2. Put the numbers into the six results, and finally get the divination results.

Below we introduce a kind of method — live number start lesson method.

Live number starting method

1. If you want to predict something, take a number immediately. The number can be what you think in your mind, or what you see, such as the license plate number, house number, telephone number, time, etc., to think of or see the number of the first reaction. For example, if I want to ask my friend if he is at home, I happen to see 14:36 on the screen of the mobile phone, so I take 1436 to calculate. Add the four numbers, 1+4+3+6=14, then subtract 3 from the number of digits you take, and subtract 2 from the number of digits you take. In this example, 1436 is a four-digit number, so subtract 3 from the number of digits. 3, just get the number divided by 6, the remainder corresponding to the following explanation (can divide the remainder is 6, for example, the number is 18, the remainder is 6), this example 11÷6→ the remainder 5 is small ji.

It looks like a lot of words, but it’s actually very simple logic.

  1. When you want to calculate an event, take a number that pops into your head or pops into your mind and look at the number that the explanation says must come to you first.

  2. Like looking at the time on your phone and getting the number 1436.

  3. Add the numbers and subtract the number of digits – 1. For example, 1436 has four digits, so subtract three from the sum of the numbers.

  4. Divide that by 6, and you get the remainder, and that remainder corresponds to your answer.

Code implementation

const valueObject = [
    {
        title: 'fine'.desc: '... '},... ]// valueList specifies the number of elements in the first reaction, such as 1436
const calcResult = (valueList) = > {
        // Get the number of bits - 1 which need to be subtracted later
	const lenCount = valueList.length === 1 ? 0 : valueList.length - 1
        // Get the sum of the elements
	const sum = valueList.reduce((sumValue, cur) = > (sumValue += cur))
        // the sum - lenCount result also corresponds to the divination result
        // If it is divisible by 6 it is the 6th result of divination, otherwise it is the remainder of dividing by 6
        // The final result is -1, because we want to get the result from the array
	let result = (sum - lenCount) % 6= = =0 ? 5 : ((sum - lenCount) % 6) - 1
	state.cur = state.valueObject[result]
}
Copy the code

Isn’t it easy?

Took ten minutes to create a fortune-telling project! Calculate marriage predestination calculate career calculate health cough up!

Online fortune-telling! Ten yuan each! Let me as

The last

In addition, this article is just for entertainment, and the author has always maintained respect for traditional Chinese culture.

Put online divination code => Github

Finally, the old man gave himself this article count on a hexagrams! Release!!!!!

Reference: there are in the study of the six rens? Serious little Liu Ren brief History zero basic divination introduction [Little Liu Ren]

See you in tomorrow’s blog!