54 lines
1016 B
Java
54 lines
1016 B
Java
package extend.mj;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import com.taurus.core.entity.ITArray;
|
|
import com.taurus.core.entity.ITObject;
|
|
import com.taurus.core.entity.TArray;
|
|
import com.taurus.core.entity.TObject;
|
|
|
|
import extend.mj.uitl.CardUtil;
|
|
|
|
public class OpenKong {
|
|
|
|
public int diceNum1;
|
|
public int diceNum2;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public int fromSeat;
|
|
|
|
|
|
public int kongSeat;
|
|
public List<Integer> drawList;
|
|
|
|
public boolean haidi;
|
|
|
|
public int tipActionSeat = -1;
|
|
|
|
public OpenKong() {
|
|
drawList = new ArrayList<Integer>();
|
|
|
|
diceNum1 = CardUtil.randomDiceNum();
|
|
diceNum2 = CardUtil.randomDiceNum();
|
|
}
|
|
|
|
public ITObject getTObject() {
|
|
ITObject data = TObject.newInstance();
|
|
data.putInt("diceNum1", diceNum1);
|
|
data.putInt("diceNum2", diceNum2);
|
|
|
|
data.putInt("from_seat", fromSeat);
|
|
data.putInt("kong_seat", kongSeat);
|
|
|
|
ITArray cardList = TArray.newInstance();
|
|
for (int card : drawList) {
|
|
cardList.addInt(card);
|
|
}
|
|
data.putTArray("cardList", cardList);
|
|
return data;
|
|
}
|
|
}
|