package com.genlot.ninglottery.game.k3.bean;

import com.genlot.ninglottery.game.bet.BetNumber;

import java.util.Random;

/**
 * @author ZhuYongKang
 * @description 二同号复选
 * @date 2019/10/21
 */
public class Multi2Same extends SingleK3{

    @Override
    public void random(int... args) {
        clear();
        //第一位
        Random rand = new Random();
        int num1 = rand.nextInt(6) + 1;
        BetNumber number1 = new BetNumber(String.valueOf(num1));
        number1.setType(BetNumber.CHECKED);
        //必须有一位*
        BetNumber number2 = new BetNumber("*");
        number2.setType(BetNumber.CHECKED);

        int index = rand.nextInt(3);
        if (index == 0) {
            mList1.add(number2);
            mList2.add(number1);
            mList3.add(number1);
        } else if (index == 1) {
            mList1.add(number1);
            mList2.add(number2);
            mList3.add(number1);
        } else {
            mList1.add(number1);
            mList2.add(number1);
            mList3.add(number2);
        }
    }

}
