c语言飞行棋

巡山小妖精
890次浏览
2021年02月08日 23:58
最佳经验
本文由作者推荐

后颈部疼痛-

2021年2月8日发(作者:中国喜剧电影推荐)


#include


#include


char


map[10][81]= {


━═━═━★¤═━■═━═★━═━★═━〓═━¤═〓━■═━═






















































































































































































































































































































═★〓━═█━═━═¤━═━═★━═━═〓━═━═¤━★═━













































































































¤═━〓 ═━═━═━═━★═━¤═━═━〓═〓━═■★━═━



< /p>


int step1=0,step2=0;//


玩家

< p>
1



2


的步数;



char p[6][30]={






李连杰



李小龙







洪金宝



不赋值



int step[101]={0};//


等价于


memset(step,0,101*sizeof(int));




int compare(int t,int i,int j)


{



int f,change;



if (step[t]==0)



{















printf(


您目前在普通的位置上


,< /p>


您在第



%d


个格上


n



return 0;


}


else if (step[t]==1)


{


printf(


您已到达幸运转盘


(



),


您在第



%d


个格上


n



p rintf(


您有


2


重选择:


1.




%s


交换位置,


2.


轰炸



%sn



printf(











:



scanf(



if (f==1)



{




change=step1;





step1=step2;





step2=change;





printf(











n





return 0;




}




else




{





if (step1==t)





{






step2=0;





}





else





{






step1=0;





}





printf(











n





return 0;




}



}



else if(step[t]==2)



{




printf(


恭喜您!顺












(


¤


)


!被炸回



6


个格


...n










if (step1==t)





{








if (step1<=6)








{









step1=0;








}








else








{









step1=step1-6;








}





}





else





{








if (step2<=6)








{









step2=0;








}








else








{









step2=step2-6;








}





}










return 0;



}



else if(step[t]==3)



{








printf(


恭喜您!您已到



%d


个格


(



)


,您可以休息一回合啦


...n< /p>



return 1;


}


else



{




printf(

< br>替你难过!你怎么能用时光隧道


(


)



?!...


算了


,



!


赢了


...n




return 2;



}


}


void fight()


{






int p1,p2,i;//


玩家


1



2





printf(










!~~~~~~~~~~~~~n



printf(









:n



printf(



for (i=1;i<6;i++)



{




printf(





}



printf(





printf(











:n< /p>


printf(








1




择< /p>


(


对应序号


)




scanf(



printf(








2




择< /p>


(


对应序号


)





scanf(



show_map() ;//


飞行棋地图;




handle(p1,p2);


}



//Handle.h


void handle(int m,int n)


{






int e=0,g=0,dic e,c1=0,c2=0;//dice


是掷骰子数


,e


接受返回参数


,c


计数变量

< br>






step[6]=step[14]=step[18]=s tep[34]=step[39]=step[51]=step[65]=step[82]=step[9 6]=1;//



星由


1


代表;




step[7] =step[41]=step[56]=step[24]=step[70]=step[85]=2;//


¤代表


2



step[10]=step[28]=step[61]=step[95]=3;//


■代表


3



step[21]=s tep[26]=step[46]=step[64]=step[73]=step[90]=step[9 2]=4;//


〓代表


4


< p>



printf(










:n



while (step1<100&&step2<100)

后颈部疼痛-


后颈部疼痛-


后颈部疼痛-


后颈部疼痛-


后颈部疼痛-


后颈部疼痛-


后颈部疼痛-


后颈部疼痛-