master
fpgajie 2026-01-11 03:00:52 +08:00
parent 0d678a354d
commit 852e4e7822
4 changed files with 48 additions and 41 deletions

Binary file not shown.

View File

@ -1665,26 +1665,26 @@ public class HuNanChangSha {
hands1.add(209);
hands1.add(209);
hands1.add(207);
hands1.add(206);
hands1.add(207);
hands1.add(207);
hands1.add(205);
hands1.add(109);
hands1.add(109);
hands1.add(202);
hands1.add(107);
hands1.add(106);
hands1.add(105);
hands1.add(203);
hands1.add(202);
hands1.add(201);
hands1.add(107);
int card= 109;
hands1.add(107);
hands1.add(103);
hands1.add(103);
int card= 209;
huNanChangSha.changShaCardInhand.addAll(hands1);
TArray tiplist= new TArray();
ITArray opcard = TArray.newInstance();
opcard.addInt(207);
opcard.addInt(206);
opcard.addInt(207);
// opcard.addInt(203);
TObject tob = new TObject();
@ -1696,8 +1696,8 @@ public class HuNanChangSha {
//tiplist.addTObject(tob);
ITArray opcard2 = TArray.newInstance();
opcard2.addInt(109);
// opcard2.addInt(206);
opcard2.addInt(209);
// opcard2.addInt(207);
TObject tob2 = new TObject();
tob2.putInt("weight",1);
tob2.putInt("id",1);
@ -1707,14 +1707,14 @@ public class HuNanChangSha {
tiplist.addTObject(tob2);
ITArray opcard3 = TArray.newInstance();
opcard2.addInt(202);
opcard3.addInt(202);
// opcard2.addInt(206);
TObject tob3 = new TObject();
tob3.putInt("weight",3);
tob3.putInt("id",2);
tob3.putInt("type",3);
tob3.putInt("card",card);
tob3.putTArray("opcard", opcard2);
tob3.putTArray("opcard", opcard3);
// tiplist.addTObject(tob3);
params.putTArray("tip_list",tiplist);

View File

@ -414,6 +414,18 @@ public class ChangShaSuanFaTest {
return String.valueOf(outcard);
}
if (pisCardsCount >= 5 && pengCard.size() == 0 && chowGroup.size() == 0) {
//大胡出牌逻辑 - 七小对
int outcard = selectCardToDiscardBig(handCards, pisCardsCount);
System.out.printf("特殊牌型处理666 +++++++++++++++++++++++++++++++++++");
return String.valueOf(outcard);
}
System.out.println(hasBigSuit);
if (hasBigSuit) {
logInfo("执行清一色策略,尝试优化花色分布");
// 调用清一色特定出牌策略
@ -428,14 +440,7 @@ public class ChangShaSuanFaTest {
// List<Integer> checktingpai = TinHuChi.checktingpai(cardInhand);
if (pisCardsCount >= 5 && pengCard.size() == 0 && chowGroup.size() == 0) {
//大胡出牌逻辑 - 七小对
int outcard = selectCardToDiscardBig(handCards, pisCardsCount);
System.out.printf("特殊牌型处理666 +++++++++++++++++++++++++++++++++++");
return String.valueOf(outcard);
}
//碰碰胡
@ -4085,7 +4090,7 @@ public class ChangShaSuanFaTest {
chiob.putInt("isDaHu",beforeIsDahu);
List checkCards = new ArrayList();
checkCards.addAll(yupanhandcard);
System.out.println("checkCards"+checkCards);
//去掉三张牌是否还能听牌
for (int i=0;i<opcard.size();i++){
Util.removeCard(checkCards,opcard.getInt(i),2);
@ -4096,6 +4101,7 @@ public class ChangShaSuanFaTest {
System.out.println("beforedj:"+beforedj);
if (beforedj>=1){
int afterdj = checkduijiang(checkCards);
System.out.println(checkCards);
if (afterdj==0){
chiob.putBoolean("xiaoJiang",true);
}else{
@ -4122,10 +4128,11 @@ public class ChangShaSuanFaTest {
//循环之后还能是大胡吗1,清一色27小对3碰碰胡4将将胡5门清
if(beforeIsDahu>0){
if (beforeIsDahu==2){
/* if (beforeIsDahu==2){
chiob.putBoolean("xiaoDahu",true);
chiob.putInt("teshu",0);
}else if (beforeIsDahu==3){
}*/
if (beforeIsDahu==3||beforeIsDahu==2){
//碰碰胡
chiob.putBoolean("xiaoDahu",false);
chiob.putInt("teshu",10);
@ -4269,10 +4276,10 @@ public class ChangShaSuanFaTest {
System.out.println("duizi:"+duizi);
System.out.println(pengGrop);
if (duizi>=4&&pengGrop.size()>=0){
if (duizi==4&&pengGrop.size()>=0){
chiob.putInt("teshu",5);
}
if (duizi>=3&&pengGrop.size()>=2){
if (duizi==3&&pengGrop.size()>=2){
chiob.putInt("teshu",8);
}
System.out.println(pengGrop.size());
@ -4615,23 +4622,23 @@ public class ChangShaSuanFaTest {
// 测试用例没有258将牌的情况
List<Integer> test1 = new ArrayList<Integer>();
test1.add(107);
test1.add(107);
test1.add(108);
test1.add(108);
test1.add(109);
test1.add(109);
test1.add(201);
test1.add(201);
test1.add(203);
test1.add(203);
test1.add(204);
test1.add(204);
test1.add(209);
test1.add(207);
test1.add(207);
test1.add(206);
test1.add(205);
test1.add(204);
test1.add(203);
test1.add(202);
test1.add(108);
test1.add(107);
test1.add(106);
test1.add(104);
test1.add(103);
int lg = countPairs(test1);
System.out.println(lg);
//int card = 206;