예제 #1
0
파일: Pillar.cs 프로젝트: stanleyz510/Iwalk
 public Pillar(string stemBranch)
 {
     if (stemBranch.Length != 2) return;
     this.Stems = new Stems(stemBranch[0]);
     this.Branch = new Branch(stemBranch[1]);
 }
예제 #2
0
파일: Pillar.cs 프로젝트: stanleyz510/Iwalk
 public Pillar(int stems, int branch)
 {
     this.Stems = new Stems(stems);
     this.Branch = new Branch(branch);
 }
예제 #3
0
        public static string QueryWeakStrong(Stems emStems,Branch emBranch)
        {
            int[] startIndex = new int[]{11,4,2,9,2,9,5,0,8,3};
            int start = startIndex[(int) emStems.Element];

            //Math.Sign((int) emStems%2 - 0.5)*(-1) +
            int index = ((-Math.Sign(((int)emStems.Element) % 2 - 0.5))*
                ((int)emBranch.Element - start) + 12) % 12;
            //return WeakStrongs[(int)emStems +]
            return WeakStrongs[index];
        }