clean();
printf("\n加1分\n");
w++;
}
else if(str[e][f-1]=='o')
{
str[e][f-1]=' ';
clean();
printf("\n下一层\n");
e=24;
f=23;
clean2();
h++;
printf("\n请最大化");
}
else if(str[e][f-1]=='f')
{
str[e][f-1]=' ';
clean();
printf("\n加2分\n");
w=w+2;
}
else if(str[e][f-1]=='B')
{
str[e][f-1]=' ';
clean();
printf("\n加10分\n");
w=w+10;
}
else if(str[e][f-1]=='t')
{
str[e][f-1]=' ';
clean();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str[e][f-1]=='s')
{
str[e][f-1]=' ';
clean();
printf("\n捡到浮木!\n");
r++;
}
else;
}
else if(x==4)
{
if(str[e+1][f]=='x')
{
d=str[e+1][f];
str[e+1][f]=str[e][f];
str[e][f]=d;
e=e+1;
clean();
printf("\n撞到了\n");
}
else if(str[e+1][f]=='e')
{
str[e+1][f]=' ';
clean();
printf("\n加1分\n");
w++;
}
else if(str[e+1][f]=='o')
{
str[e+1][f]=' ';
clean();
printf("\n下一层\n");
e=24;
f=23;
clean2();
h++;
printf("\n请最大化");
}
else if(str[e+1][f]=='f')
{
str[e+1][f]=' ';
clean();
printf("\n加2分\n");
w=w+2;
}
else if(str[e+1][f]=='B')
{
str[e+1][f]=' ';
clean();
printf("\n加10分\n");
w=w+10;
}
else if(str[e+1][f]=='t')
{
str[e+1][f]=' ';
clean();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str[e+1][f]=='s')
{
str[e+1][f]=' ';
clean();
printf("\n捡到浮木!\n");
r++;
}
else;
}
}
/******************************判断第二层*****************************/
else if(h==1)/********************************************************************/
{
if(x==1)
{
if(str2[e][f+1]=='x')
{
d=str2[e][f+1];
str2[e][f+1]=str2[e][f];
str2[e][f]=d;
f=f+1;
clean2();
printf("\n撞到了\n");
}
else if(str2[e][f+1]=='e')
{
str2[e][f+1]=' ';
clean2();
printf("\n加1分\n");
w++;
}
else if(str2[e][f+1]=='o')
{
str2[e][f+1]=' ';
clean2();
printf("\n你赢了\n");
break;
}
else if(str2[e][f+1]=='f')
{
str2[e][f+1]=' ';
clean2();
printf("\n加2分\n");
w=w+2;
}
else if(str2[e][f+1]=='B')
{
str2[e][f+1]=' ';
clean2();
printf("\n加10分\n");
w=w+10;
}
else if(str2[e][f+1]=='t')
{
str2[e][f+1]=' ';
clean2();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str2[e][f+1]=='s')
{
str2[e][f+1]=' ';
clean2();
printf("\n捡到浮木!\n");
r++;
}
else if(str2[e][f+1]=='c')
{
d=str2[e][f];
str2[e][f]=str2[6][8];
str2[6][8]=d;
str2[e][f+1]=' ';
str2[e][f]=' ';
e=6;
f=8;
clean2();
}
else if(str2[e][f+1]=='S')
{
if(chan==0)
{
d=str2[e][f+1];
str2[e][f+1]=str2[e][f];
str2[e][f]=d;
f=f+1;
clean2();
printf("\n山崩地区,此路不通");
}
else if(chan==1)
printf("\n加1分\n");
w++;
}
else if(str[e][f-1]=='o')
{
str[e][f-1]=' ';
clean();
printf("\n下一层\n");
e=24;
f=23;
clean2();
h++;
printf("\n请最大化");
}
else if(str[e][f-1]=='f')
{
str[e][f-1]=' ';
clean();
printf("\n加2分\n");
w=w+2;
}
else if(str[e][f-1]=='B')
{
str[e][f-1]=' ';
clean();
printf("\n加10分\n");
w=w+10;
}
else if(str[e][f-1]=='t')
{
str[e][f-1]=' ';
clean();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str[e][f-1]=='s')
{
str[e][f-1]=' ';
clean();
printf("\n捡到浮木!\n");
r++;
}
else;
}
else if(x==4)
{
if(str[e+1][f]=='x')
{
d=str[e+1][f];
str[e+1][f]=str[e][f];
str[e][f]=d;
e=e+1;
clean();
printf("\n撞到了\n");
}
else if(str[e+1][f]=='e')
{
str[e+1][f]=' ';
clean();
printf("\n加1分\n");
w++;
}
else if(str[e+1][f]=='o')
{
str[e+1][f]=' ';
clean();
printf("\n下一层\n");
e=24;
f=23;
clean2();
h++;
printf("\n请最大化");
}
else if(str[e+1][f]=='f')
{
str[e+1][f]=' ';
clean();
printf("\n加2分\n");
w=w+2;
}
else if(str[e+1][f]=='B')
{
str[e+1][f]=' ';
clean();
printf("\n加10分\n");
w=w+10;
}
else if(str[e+1][f]=='t')
{
str[e+1][f]=' ';
clean();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str[e+1][f]=='s')
{
str[e+1][f]=' ';
clean();
printf("\n捡到浮木!\n");
r++;
}
else;
}
}
/******************************判断第二层*****************************/
else if(h==1)/********************************************************************/
{
if(x==1)
{
if(str2[e][f+1]=='x')
{
d=str2[e][f+1];
str2[e][f+1]=str2[e][f];
str2[e][f]=d;
f=f+1;
clean2();
printf("\n撞到了\n");
}
else if(str2[e][f+1]=='e')
{
str2[e][f+1]=' ';
clean2();
printf("\n加1分\n");
w++;
}
else if(str2[e][f+1]=='o')
{
str2[e][f+1]=' ';
clean2();
printf("\n你赢了\n");
break;
}
else if(str2[e][f+1]=='f')
{
str2[e][f+1]=' ';
clean2();
printf("\n加2分\n");
w=w+2;
}
else if(str2[e][f+1]=='B')
{
str2[e][f+1]=' ';
clean2();
printf("\n加10分\n");
w=w+10;
}
else if(str2[e][f+1]=='t')
{
str2[e][f+1]=' ';
clean2();
if(r>=1)
r--;
else
{
printf("\n掉沼泽里了······\n可怜的人,");
break;
}
}
else if(str2[e][f+1]=='s')
{
str2[e][f+1]=' ';
clean2();
printf("\n捡到浮木!\n");
r++;
}
else if(str2[e][f+1]=='c')
{
d=str2[e][f];
str2[e][f]=str2[6][8];
str2[6][8]=d;
str2[e][f+1]=' ';
str2[e][f]=' ';
e=6;
f=8;
clean2();
}
else if(str2[e][f+1]=='S')
{
if(chan==0)
{
d=str2[e][f+1];
str2[e][f+1]=str2[e][f];
str2[e][f]=d;
f=f+1;
clean2();
printf("\n山崩地区,此路不通");
}
else if(chan==1)