public PinfuResolver(MentsuComp comp, GeneralSituation generalSituation, PersonalSituation personalSituation) : base(generalSituation, personalSituation) { janto = comp.getJanto(); shuntsuCount = comp.getShuntsuCount(); shuntsuList = comp.getShuntsuList(); last = comp.getLast(); }
public TsuisoResolver(MentsuComp comp) { janto = comp.getJanto(); shuntsuList = comp.getShuntsuList(); toitsuList = comp.getToitsuList(); kotsuList = comp.getKotsuKantsu(); }
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とします * * @return */ private int calcFuByJanto() { Tile jantoTile = comp.getJanto().getTile(); int tmp = 0; if (jantoTile == generalSituation.getBakaze()) { tmp += 2; } if (jantoTile == personalSituation.getJikaze()) { tmp += 2; } if (jantoTile.getType() == TileType.SANGEN) { tmp += 2; } return(tmp); }
public ShosangenResolver(MentsuComp comp) { janto = comp.getJanto(); kotsuList = comp.getKotsuKantsu(); }
public ShosushiResolver(MentsuComp comp) { janto = comp.getJanto(); kotsuList = comp.getKotsuKantsu(); kotsuCount = comp.getKotsuCount() + comp.getKantsuCount(); }
public ChurenpohtohResolver(MentsuComp comp) { janto = comp.getJanto(); shuntsuList = comp.getShuntsuList(); kotsuList = comp.getKotsuList(); }
public JunchanResolver(MentsuComp comp) { janto = comp.getJanto(); shuntsuList = comp.getShuntsuList(); kotsuList = comp.getKotsuKantsu(); }
public ChinrohtohResolver(MentsuComp comp) { totalKotsuKantsu = comp.getKotsuCount() + comp.getKantsuCount(); kotsuList = comp.getKotsuKantsu(); janto = comp.getJanto(); }