public Pillar(string stemBranch) { if (stemBranch.Length != 2) return; this.Stems = new Stems(stemBranch[0]); this.Branch = new Branch(stemBranch[1]); }
public Pillar(int stems, int branch) { this.Stems = new Stems(stems); this.Branch = new Branch(branch); }
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]; }