示例#1
0
 public PinfuResolver(MentsuComp comp, GeneralSituation generalSituation, PersonalSituation personalSituation) : base(generalSituation, personalSituation)
 {
     janto        = comp.getJanto();
     shuntsuCount = comp.getShuntsuCount();
     shuntsuList  = comp.getShuntsuList();
     last         = comp.getLast();
 }
示例#2
0
 public TsuisoResolver(MentsuComp comp)
 {
     janto       = comp.getJanto();
     shuntsuList = comp.getShuntsuList();
     toitsuList  = comp.getToitsuList();
     kotsuList   = comp.getKotsuKantsu();
 }
示例#3
0
        public bool isMatch()
        {
            //雀頭がnullなら七対子なのでfalse
            if (comp.getJanto() == null)
            {
                return(false);
            }
            //雀頭が一九字牌以外ならfalse
            int jantoNum = comp.getJanto().getTile().getNumber();

            if (jantoNum != 1 && jantoNum != 9 && jantoNum != 0)
            {
                return(false);
            }

            //順子が無ければfalse
            if (comp.getShuntsuCount() == 0)
            {
                return(false);
            }

            //順子が123の順子と789の順子でなければfalse
            foreach (Shuntsu shuntsu in comp.getShuntsuList())
            {
                int shuntsuNum = shuntsu.getTile().getNumber();
                if (shuntsuNum != 2 && shuntsuNum != 8)
                {
                    return(false);
                }
            }

            //刻子・槓子が一九字牌以外ならfalse
            foreach (Kotsu kotsu in comp.getKotsuKantsu())
            {
                int kotsuNum = kotsu.getTile().getNumber();
                if (kotsuNum != 1 && kotsuNum != 9 && kotsuNum != 0)
                {
                    return(false);
                }
            }

            //ここまでくればtrue
            return(true);
        }
示例#4
0
 public RyuisoResolver(MentsuComp hands)
 {
     toitsuList  = hands.getToitsuList();
     shuntsuList = hands.getShuntsuList();
     kotsuList   = hands.getKotsuKantsu();
 }
示例#5
0
 public HonrohtohResolver(MentsuComp comp)
 {
     shuntsuList = comp.getShuntsuList();
     toitsuList  = comp.getToitsuList();
     kotsuList   = comp.getKotsuKantsu();
 }
示例#6
0
 public RyanpeikoResolver(MentsuComp comp)
 {
     shuntsuList = comp.getShuntsuList();
 }
 public ChurenpohtohResolver(MentsuComp comp)
 {
     janto       = comp.getJanto();
     shuntsuList = comp.getShuntsuList();
     kotsuList   = comp.getKotsuList();
 }
示例#8
0
 public SanshokudohjunResolver(MentsuComp comp)
 {
     shuntsuCount = comp.getShuntsuCount();
     shuntsuList  = comp.getShuntsuList();
 }
示例#9
0
 public JunchanResolver(MentsuComp comp)
 {
     janto       = comp.getJanto();
     shuntsuList = comp.getShuntsuList();
     kotsuList   = comp.getKotsuKantsu();
 }
示例#10
0
 public IkkitsukanResolver(MentsuComp comp)
 {
     shuntsuList  = comp.getShuntsuList();
     shuntsuCount = comp.getShuntsuCount();
 }