首页>代码>java swing五子棋人机版客户端游戏>/五子棋/src/五子棋人机版/compulterpeople.java
package �������˻��;

public class compulterpeople {
public static point getPoint(double[][] num,double numcomputer[][],boolean b[][],boolean h[][]) {
	boolean havefour=assume.checkfour(b, h);
	point p=assume.p;
	boolean havefourcom=assume.checkfour(h, b);//�˻�
	point pcom=assume.p;
	double middle=num[0][0];
	double middlec=numcomputer[0][0];
	int x=0,y=0;
	int xc=0,yc=0;
for (int i = 0; i < num.length; i++) {
	for (int j = 0; j < num.length; j++) {
		if (middle<num[i][j]) {
			x=i;
			y=j;
			middle=num[i][j];
		}
		if (middlec<numcomputer[i][j]) {
			xc=i;
			yc=j;
			middlec=numcomputer[i][j];
		}
		
	}
	
}	//�ҵ�����Ҫ��(x,y)
if (x==0&&y==0) {//�˻��������
	return new point(10,10);
	
}
if (middlec>=4.0) {
	
}
else {
	if (havefourcom&&(pcom.getX()!=0||pcom.getY()!=0)) {//����ʹ��AI���м������Ĺ���
	return pcom;
	
	
}
}

if (middlec>=4.0) {//�ʵ�����
	return new point(xc,yc);
}
else {
	if (middle>=4.0) {//���4.0�Ѿ������ٴ��ж�һ������
		
	}
	else {
		if (havefour) {//������������---��
		return p;
	}
	}
	
	if (middle<4.0&&middle>=3.0) {
//����		
}
if(middle<3.0) {
	if (middlec>=3.0) {
		return new point(xc,yc);
		
	}
}
if ((int)middle==(int)middlec) {
	return new point(xc,yc);
	
}
	
}


	
	return new point(x,y);
}
}
最近下载更多
12mmn1  LV1 2024年5月28日
2485243744  LV1 2023年10月25日
2385649653  LV7 2023年6月26日
hhhhhh724  LV1 2023年5月31日
Swjyykx  LV1 2023年4月27日
上邪(ye)  LV6 2023年4月23日
段朝洪  LV15 2023年3月7日
songguo520  LV1 2023年1月13日
刘鹏yyds  LV10 2022年12月21日
simsom  LV1 2022年12月13日
最近浏览更多
yzhsnjdn  LV1 2024年12月17日
yansunling  LV1 2024年11月6日
lhm789  LV6 2024年9月23日
qqqww11  LV2 2024年6月26日
12mmn1  LV1 2024年5月28日
12mmn5  LV1 2024年5月28日
dexd1111  LV1 2024年5月28日
Huangjy2157  LV2 2024年1月4日
张晨荣  LV1 2023年12月19日
2485243744  LV1 2023年10月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友