public void victory(){
String str1=new String();
String str2="@@@@@";
////////////////////////////////////
int X=0,Y=0;//用来记录每次查找到的“@”字符的数组下标,从两个for循环里导出来
int k=0;int j=-1;//注意首次的控制条件的建立,j为-1可以使第二个for检测首次从下标0开始。
///////////////////////////////////
while(true)
{
LABEL:for(;k
if(FiveChessPlayers.fcg.getString()[k][j].equals("@")){
X=k;
Y=j;
break LABEL;//每找到一个相同字符则跳出;
}else{
System.out.println(k+"行");
System.out.println(j+"列");
// continue;//多余
}
}
}
// System.exit(0);//调试语句,退出虚拟机
if(k
for(int i=0;i<5;i++){
if(X
if(i!=4)
continue;
if(i==4){
System.out.println("安列取"+str1);
if(str1.equals(str2)){
System.out.println(f2.getName()+" is the winner");
System.exit(0);//结束退出虚拟机
}else{
str1="";
}
}
}
}
for(int i=0;i<5;i++){
if((X+4)
if(i!=4)
continue;
if(i==4){
System.out.println("四十五度向前取"+str1);
if(str1.equals(str2)){
System.out.println(f2.getName()+" is the winner");
System.exit(0);//胜利结束游戏
}else{
str1="";
}
}
}
}
for(int i=0;i<5;i++){
if(i!=4)
continue;
if(i==4){
System.out.println("安行取"+str1);
if(str1.equals(str2)){
System.out.println(f2.getName()+" is the winner");
System.exit(0);//如上
}else{
str1="";
}
}
}
}
for(int i=0;i<5;i++){
if((X+4)
str1+=FiveChessPlayers.fcg.getString()[X+i][Y-i];
if(i!=4)
continue;
if(i==4){
System.out.println("四十五度向后取"+str1);
if(str1.equals(str2)){
System.out.println(f2.getName()+" is the winner");
System.exit(0);//如上
}else{
str1="";
}
}
// str1+=f1.String1[X+i][Y+i];//注意对比写法
// continue;
// str1=""+f1.String1[X+i][Y+i];//注意错误的写法;不然每次覆盖前一次的串累加值;
// continue;
}
}
}
//////////////////////////////////////////////////////////////////////////////
if(str1==""&k
continue ;
}else{
break;
}
}
}
////////////////////////////////////////////////////////////////////
public void victory1(){
String str4=new String();
String str3="#####";
////////////////////////////////////
int X=0,Y=0;
int k=0;int j=0;
while(true)
{
LABEL:for(;k