用户工具

站点工具


code:金口诀求用爻php算法

南山先生金口诀排盘程序求用爻PHP算法

// 作者:南山先生
// 演示网址:http://www.fatediy.com
// 返回结果:2将神,3贵神
private function Yongyao($fangYinyang,$jiangYinyang,$shiYinyang)
{
	$yin=0;
	$yang=0;
	$yongyao='';
	if($fangYinyang==1)
	{
		$yang=$yang+2;
	}
	if($jiangYinyang==1)
	{
		$yang=$yang+1;
	}
	if($shiYinyang==1)
	{
		$yang=$yang+1;
	}
	if($yang==0||$yang==2)
	{
		$yongyao=2;
	}
	else if($yang==1)
	{
		if($shiYinyang==1)
		{
			$yongyao=3;
		}
		else
		{
			$yongyao=2;
		}
	}
	else if($yang==3)
	{
		if($shiYinyang==0)
		{
			$yongyao=3;
		}
		else
		{
			$yongyao=2;
		}
	}
	else
	{
		$yongyao=3;
	}
	return $yongyao;
}
code/金口诀求用爻php算法.txt · 最后更改: 2020/05/17 06:59 由 admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki