package org.mahjong4j.yaku.normals;


import org.mahjong4j.hands.MentsuComp;
import org.mahjong4j.tile.MahjongTile;

/**
 * 白判定クラス
 * 白の刻子もしくは槓子が含まれる場合成立
 *
 * @author yu1ro
 */
public class HakuResolver implements NormalYakuResolver {
    private MahjongYakuEnum yakuEnum = MahjongYakuEnum.HAKU;

    public HakuResolver(MentsuComp hands) {

    }

    public MahjongYakuEnum getNormalYaku() {
        return yakuEnum;
    }

    public boolean isMatch() {
        return false;
    }

    public boolean isHaku(MahjongTile[] kotsu) {
        for (int i = 0; i < kotsu.length && kotsu[i] != null; i++) {
            if (kotsu[i] == MahjongTile.HAK) {
                return true;
            }

        }
        return false;
    }
}

@@ -294,168 +294,381 @@
 KU;%0A
-%0A    public HakuResolver(MentsuComp hands) %7B%0A%0A    %7D%0A%0A    public MahjongYakuEnum getNormalYaku() %7B%0A        return yakuEnum;%0A    %7D%0A%0A    public boolean isMatch() %7B
+    private List%3CKotsu%3E kotsuList;%0A    %0A    public HakuResolver(MentsuComp comp) %7B%0A    %09%09kotsuList = comp.getKotsuKantsu();%0A    %7D%0A%0A    public MahjongYakuEnum getNormalYaku() %7B%0A        return yakuEnum;%0A    %7D%0A%0A    public boolean isMatch() %7B%0A        for (Kotsu kotsu : kotsuList) %7B%0A        %09if (kotsu.getTile() == MahjongTile.HAK) %7B%0A        %09%09return true;%0A        %09%7D%0A        %7D
 %0A   

add haku resolver