Exemple #1
0
        public bool isMatch()
        {
            if (generalSituation == null || personalSituation == null)
            {
                return(false);
            }
            bool isOpen = false;

            foreach (Mentsu mentsu in comp.getAllMentsu())
            {
                if (mentsu.isOpen())
                {
                    isOpen = true;
                }
            }
            return(personalSituation.isTsumo() && !isOpen);
        }
        public bool isMatch()
        {
            List <Mentsu> allMentsu = comp.getAllMentsu();
            TileType      firstType = allMentsu[0].getTile().getType();

            if (firstType == TileType.FONPAI || firstType == TileType.SANGEN)
            {
                return(false);
            }

            foreach (Mentsu mentsu in allMentsu)
            {
                TileType checkType = mentsu.getTile().getType();
                if (firstType != checkType)
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #3
0
        /**
         * 符計算をします
         * 役なしの場合は0
         * Situationが無い場合は一律で20
         */
        private int calcFu()
        {
            if (normalYakuList.Count() == 0)
            {
                return(0);
            }
            if (personalSituation == null || generalSituation == null)
            {
                return(20);
            }
            // 特例の平和ツモと七対子の符
            if (normalYakuList.Contains(PINFU) && normalYakuList.Contains(TSUMO))
            {
                return(20);
            }
            if (normalYakuList.Contains(CHITOITSU))
            {
                return(25);
            }

            int tmpFu = 20;

            // 門前ロンなら+10
            tmpFu += calcFuByAgari();

            // 各メンツの種類による加符
            foreach (Mentsu mentsu in comp.getAllMentsu())
            {
                tmpFu += mentsu.getFu();
            }

            tmpFu += calcFuByWait(comp, hands.getLast());
            tmpFu += calcFuByJanto();

            return(tmpFu);
        }
Exemple #4
0
 public TanyaoResolver(MentsuComp comp)
 {
     allMentsu = comp.getAllMentsu();
 }
Exemple #5
0
 public HonitsuResolver(MentsuComp comp)
 {
     allMentsu = comp.getAllMentsu();
 }