篮球闯关小游戏1.02

6 篇文章 0 订阅
6 篇文章 0 订阅

最近忙里偷闲,看能不能在开学前肝完这个闯关游戏

1.02更新:

        1.自身球队查看功能

越写越便秘,今天就写这么多吧

上代码:

#include <bits/stdc++.h>
#include <Windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
using namespace std;
struct zhongfeng{
	int sanfen;
	int neifang;
	int neixian;
	int lanban; 
	int ability;
	int R_ability;//三分占10%,内防占30%,篮板占30%,内线线占30% 
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
};
struct daqian{
	int toulan;
	int xiefang;
	int neixian;
	int lanban; 
	int ability;
	int R_ability;//协防占30%,内线占30%,篮板占10%,投篮占30% 
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
};
struct xiaoqian{
	int defen;
	int lanban;
	int zhugong;
	int fangshou; 
	int ability;
	int R_ability;//得分占30%,防守占30%,篮板占20%,助攻占20% 
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
};
struct fenwei{
	int defen;
	int yundong;
	int fangshou; 
	int ability;
	int R_ability;//得分占40%,防守占20%,运动占40% 
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
};
struct kongwei{
	int defen;
	int yundong;
	int fangshou; 
	int zhugong;
	int ability;
	int R_ability;//得分占30%,防守占20%,运动占30% ,助攻占20% 
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
};
struct zishen{
	int toulan;
	int sanfen;
	int lanban;
	int neifang;
	int neixian;
	int defen;
	int yundong;
	int fangshou; 
	int xiefang;
	int zhugong;
	int ability;
	int R_ability;
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
}; 
struct huosai{
	int toulan;
	int sanfen;
	int lanban;
	int neifang;
	int neixian;
	int defen;
	int yundong;
	int fangshou; 
	int xiefang;
	int zhugong;
	int ability;
	int R_ability;
	bool real=false;
	string name;
	bool shoufa=false;
	bool weizhi[6];//控卫1,分卫2,小前3,大前4,中锋5 
}; 
zhongfeng C[12];
daqian PF[12];
xiaoqian SF[12]; 
fenwei SG[12];
kongwei PG[12]; 
huosai piston[17];
zishen me[40];
int main(){
	for(int i=1;i<=12;i++) memset(C[i].weizhi,false,sizeof(C[i].weizhi));
	for(int i=1;i<=12;i++) memset(PF[i].weizhi,false,sizeof(PF[i].weizhi));
	for(int i=1;i<=12;i++) memset(SF[i].weizhi,false,sizeof(SF[i].weizhi));
	for(int i=1;i<=12;i++) memset(SG[i].weizhi,false,sizeof(SG[i].weizhi));
	for(int i=1;i<=12;i++) memset(PG[i].weizhi,false,sizeof(PG[i].weizhi));
	for(int i=1;i<=12;i++) memset(piston[i].weizhi,false,sizeof(piston[i].weizhi));
	for(int i=1;i<=12;i++) memset(me[i].weizhi,false,sizeof(me[i].weizhi));
	{
	C[1].name="克里斯韦伯"; C[1].ability=93; C[1].weizhi[5]=true; C[1].sanfen=66; C[1].neixian=90; C[1].lanban=92; C[1].neifang=78; C[1].R_ability=85; C[1].real=true;   
	C[2].name="安德烈德拉蒙德"; C[2].ability=79; C[2].weizhi[5]=true; C[2].sanfen=47; C[2].neixian=85; C[2].lanban=98; C[2].neifang=77; C[2].R_ability=83;
	C[3].name="波尔津吉斯"; C[3].ability=87; C[3].weizhi[5]=true; C[3].sanfen=81; C[3].neixian=85; C[3].lanban=73; C[3].neifang=78; C[3].R_ability=80;
	C[4].name="温德尔卡特"; C[4].ability=80; C[4].weizhi[5]=true; C[4].sanfen=81; C[4].neixian=80; C[4].lanban=78; C[4].neifang=82; C[4].R_ability=81;
	C[5].name="克拉克斯顿"; C[5].ability=81; C[5].weizhi[5]=true; C[5].sanfen=64; C[5].neixian=77; C[5].lanban=89; C[5].neifang=89; C[5].R_ability=83;
	C[6].name="阿丘瓦"; C[6].ability=77; C[6].weizhi[5]=true; C[6].sanfen=67; C[6].neixian=82; C[6].lanban=85; C[6].neifang=79; C[6].R_ability=81;
	C[7].name="博班·马扬诺维奇"; C[7].ability=72; C[7].weizhi[5]=true; C[7].sanfen=63; C[7].neixian=69; C[7].lanban=87; C[7].neifang=73; C[7].R_ability=75;
	C[8].name="布莱克·格里芬"; C[8].ability=75; C[8].weizhi[5]=true; C[8].sanfen=78; C[8].neixian=74; C[8].lanban=77; C[8].neifang=73; C[8].R_ability=75; 
	C[9].name="德安德烈·乔丹"; C[9].ability=76; C[9].weizhi[5]=true; C[9].sanfen=25; C[9].neixian=69; C[9].lanban=91; C[9].neifang=70; C[9].R_ability=72; 
	C[10].name="泰吉布森"; C[10].ability=73; C[10].weizhi[5]=true; C[10].sanfen=50; C[10].neixian=69; C[10].lanban=62; C[10].neifang=69; C[10].R_ability=65;
	}
	{
	PF[1].name="詹姆斯沃西"; PF[1].ability=95; PF[1].weizhi[4]=true; PF[1].toulan=90; PF[1].neixian=93; PF[1].lanban=88; PF[1].xiefang=89; PF[1].R_ability=91; PF[1].real=true; 
	PF[2].name="安德烈基里连科"; PF[2].ability=89; PF[2].weizhi[4]=true; PF[2].toulan=86; PF[2].neixian=77; PF[2].lanban=87; PF[2].xiefang=91; PF[2].R_ability=85;
	PF[3].name="杰伦约翰逊"; PF[3].ability=80; PF[3].weizhi[4]=true; PF[3].toulan=83; PF[3].neixian=82; PF[3].lanban=80; PF[3].xiefang=60; PF[3].R_ability=76;
	PF[4].name="德雷蒙德格林"; PF[4].ability=83; PF[4].weizhi[4]=true; PF[4].toulan=83; PF[4].neixian=63; PF[4].lanban=80; PF[4].xiefang=89; PF[4].R_ability=79;
	PF[5].name="PJ塔克"; PF[5].ability=72; PF[5].weizhi[4]=true; PF[5].toulan=80; PF[5].neixian=65; PF[5].lanban=58; PF[5].xiefang=78; PF[5].R_ability=70; 
	PF[6].name="杰伦史密斯"; PF[6].ability=78; PF[6].weizhi[4]=true; PF[6].toulan=84; PF[6].neixian=78; PF[6].lanban=85; PF[6].xiefang=59; PF[6].R_ability=75; 
	PF[7].name="尼古拉斯巴图姆"; PF[7].ability=75; PF[7].weizhi[4]=true; PF[7].toulan=84; PF[7].neixian=63; PF[7].lanban=58; PF[7].xiefang=65; PF[7].R_ability=70; 
	PF[8].name="克里斯穆雷"; PF[8].ability=74; PF[8].weizhi[4]=true; PF[8].toulan=73; PF[8].neixian=69; PF[8].lanban=58; PF[8].xiefang=64; PF[8].R_ability=68; 
	PF[9].name="鲁迪盖伊"; PF[9].ability=74; PF[9].weizhi[4]=true; PF[9].toulan=77; PF[9].neixian=65; PF[9].lanban=68; PF[9].xiefang=57; PF[9].R_ability=67;
	PF[10].name="戴维斯贝尔坦斯"; PF[10].ability=74; PF[10].weizhi[4]=true; PF[10].toulan=77; PF[10].neixian=67; PF[10].lanban=47; PF[10].xiefang=60; PF[10].R_ability=66;
	}
	{
	SF[1].name="拉里伯德"; SF[1].ability=98; SF[1].weizhi[3]=true; SF[1].defen=96; SF[1].zhugong=92; SF[1].fangshou=95; SF[1].lanban=84; SF[1].R_ability=93; SF[1].real=true;
	SF[2].name="杰伦威廉姆斯"; SF[2].ability=86; SF[2].weizhi[3]=true; SF[2].defen=92; SF[2].zhugong=82; SF[2].fangshou=77; SF[2].lanban=65; SF[2].R_ability=81; 
	SF[3].name="麦克丹尼尔斯"; SF[3].ability=80; SF[3].weizhi[3]=true; SF[3].defen=82; SF[3].zhugong=74; SF[3].fangshou=89; SF[3].lanban=46; SF[3].R_ability=76;
	SF[4].name="约什哈特"; SF[4].ability=82; SF[4].weizhi[3]=true; SF[4].defen=82; SF[4].zhugong=80; SF[4].fangshou=74; SF[4].lanban=82; SF[4].R_ability=80;
	SF[5].name="安德鲁维金斯"; SF[5].ability=79; SF[5].weizhi[3]=true; SF[5].defen=82; SF[5].zhugong=80; SF[5].fangshou=71; SF[5].lanban=56; SF[5].R_ability=74;
	SF[6].name="卡姆惠特莫尔"; SF[6].ability=79; SF[6].weizhi[3]=true; SF[6].defen=83; SF[6].zhugong=85; SF[6].fangshou=61; SF[6].lanban=67; SF[6].R_ability=75;
	SF[7].name="加里佩顿"; SF[7].ability=78; SF[7].weizhi[3]=true; SF[7].defen=80; SF[7].zhugong=78; SF[7].fangshou=87; SF[7].lanban=62; SF[7].R_ability=79;
	SF[8].name="比拉尔库利巴利"; SF[8].ability=77; SF[8].weizhi[3]=true; SF[8].defen=75; SF[8].zhugong=69; SF[8].fangshou=79; SF[8].lanban=57; SF[8].R_ability=72;
	SF[9].name="丰泰基奥"; SF[9].ability=78; SF[9].weizhi[3]=true; SF[9].defen=89; SF[9].zhugong=59; SF[9].fangshou=56; SF[9].lanban=55; SF[9].R_ability=67;
	SF[10].name="道格麦克德模特"; SF[10].ability=73; SF[10].weizhi[3]=true; SF[10].defen=83; SF[10].zhugong=66; SF[10].fangshou=54; SF[10].lanban=40; SF[10].R_ability=63;
	}
	{
	SG[1].name="科比布莱恩特"; SG[1].ability=98; SG[1].weizhi[2]=true; SG[1].defen=93; SG[1].yundong=94; SG[1].fangshou=97; SG[1].R_ability=95; SG[1].real=true;
	SG[2].name="特雷斯马克西"; SG[2].ability=89; SG[2].weizhi[2]=true; SG[2].defen=90; SG[2].yundong=90; SG[2].fangshou=71; SG[2].R_ability=87;
	SG[3].name="杰伦格林"; SG[3].ability=84; SG[3].weizhi[2]=true; SG[3].defen=85; SG[3].yundong=89; SG[3].fangshou=69; SG[3].R_ability=84;
	SG[4].name="OG阿奴诺比"; SG[4].ability=84; SG[4].weizhi[2]=true; SG[4].defen=83; SG[4].yundong=84; SG[4].fangshou=91; SG[4].R_ability=85;
	SG[5].name="奥萨尔汤普森"; SG[5].ability=79; SG[5].weizhi[2]=true; SG[5].defen=80; SG[5].yundong=96; SG[5].fangshou=84; SG[5].R_ability=88;
	SG[6].name="约什基迪"; SG[6].ability=79; SG[6].weizhi[2]=true; SG[6].defen=82; SG[6].yundong=80; SG[6].fangshou=69; SG[6].R_ability=79;
	SG[7].name="杰登艾维"; SG[7].ability=79; SG[7].weizhi[2]=true; SG[7].defen=80; SG[7].yundong=90; SG[7].fangshou=72; SG[7].R_ability=83;
	SG[8].name="威尔巴顿"; SG[8].ability=72; SG[8].weizhi[2]=true; SG[8].defen=72; SG[8].yundong=77; SG[8].fangshou=76; SG[8].R_ability=75;
	SG[9].name="麦克斯克里斯蒂"; SG[9].ability=73; SG[9].weizhi[2]=true; SG[9].defen=85; SG[9].yundong=89; SG[9].fangshou=60; SG[9].R_ability=82;
	SG[10].name="乔英格尔斯"; SG[10].ability=74; SG[10].weizhi[2]=true; SG[10].defen=75; SG[10].yundong=71; SG[1].fangshou=78; SG[10].R_ability=74;
	}
	{
	PG[1].name="魔术师约翰逊"; PG[1].ability=98; PG[1].weizhi[1]=true; PG[1].defen=93; PG[1].yundong=93; PG[1].fangshou=90; PG[1].zhugong=97; PG[1].R_ability=94; PG[1].real=true;
	PG[2].name="狄龙福克斯"; PG[2].ability=88; PG[2].weizhi[1]=true; PG[2].defen=89; PG[2].yundong=94; PG[2].fangshou=78; PG[2].zhugong=91; PG[2].R_ability=89;
	PG[3].name="达柳斯加兰"; PG[3].ability=82; PG[3].weizhi[1]=true; PG[3].defen=84; PG[3].yundong=89; PG[3].fangshou=69; PG[3].zhugong=92; PG[3].R_ability=85;
	PG[4].name="乔丹普尔"; PG[4].ability=80; PG[4].weizhi[1]=true; PG[4].defen=80; PG[4].yundong=79; PG[4].fangshou=65; PG[4].zhugong=85; PG[4].R_ability=79;
	PG[5].name="科尔安东尼"; PG[5].ability=79; PG[5].weizhi[1]=true; PG[5].defen=84; PG[5].yundong=81; PG[5].fangshou=69; PG[5].zhugong=83; PG[5].R_ability=80;
	PG[6].name="斯科特亨德森"; PG[6].ability=78; PG[6].weizhi[1]=true; PG[6].defen=77; PG[6].yundong=95; PG[6].fangshou=66; PG[6].zhugong=87; PG[6].R_ability=83;
	PG[7].name="拉塞尔维斯布鲁克"; PG[7].ability=78; PG[7].weizhi[1]=true; PG[7].defen=70; PG[7].yundong=92; PG[7].fangshou=74; PG[7].zhugong=87; PG[7].R_ability=81;
	PG[8].name="丹尼斯施罗德"; PG[8].ability=78; PG[8].weizhi[1]=true; PG[8].defen=83; PG[8].yundong=85; PG[8].fangshou=73; PG[8].zhugong=84; PG[8].R_ability=82;
	PG[9].name="帕蒂米尔斯"; PG[9].ability=72; PG[9].weizhi[1]=true; PG[9].defen=75; PG[9].yundong=79; PG[9].fangshou=65; PG[9].zhugong=85; PG[9].R_ability=77;
	PG[10].name="以赛亚托马斯"; PG[10].ability=72; PG[10].weizhi[1]=true; PG[10].defen=77; PG[10].yundong=86; PG[10].fangshou=47; PG[10].zhugong=85; PG[10].R_ability=76;
	}
	{
	piston[1].name="凯德康宁汉姆"; piston[1].ability=86; piston[1].weizhi[1]=true; piston[1].defen=91; piston[1].yundong=85; piston[1].fangshou=75; piston[1].zhugong=84; piston[1].R_ability=85; piston[1].shoufa=true;
	piston[2].name="杰伦杜伦"; piston[2].ability=81; piston[2].weizhi[5]=true; piston[2].sanfen=35; piston[2].neixian=80; piston[2].neifang=72; piston[2].lanban=95; piston[2].R_ability=77; piston[2].shoufa=true;
	piston[3].name="托拜厄哈里斯"; piston[3].ability=80; piston[3].weizhi[4]=true; piston[3].xiefang=65; piston[3].neixian=76; piston[3].toulan=85; piston[3].lanban=69; piston[3].R_ability=75; piston[3].shoufa=true;
	piston[4].name="奥萨尔汤普森"; piston[4].ability=79; piston[4].weizhi[3]=true; piston[4].defen=80; piston[4].fangshou=84; piston[4].lanban=75; piston[4].zhugong=83; piston[4].R_ability=81; piston[4].shoufa=true; 
	piston[5].name="杰登艾维"; piston[5].ability=79; piston[5].weizhi[2]=true; piston[5].defen=80; piston[5].yundong=90; piston[5].fangshou=72; piston[5].R_ability=83; piston[5].shoufa=true;
	piston[6].name="保罗里德"; piston[6].ability=79; piston[6].weizhi[4]=true; piston[6].xiefang=54; piston[6].neixian=76; piston[6].lanban=86; piston[6].toulan=82; piston[6].R_ability=72;
	piston[7].name="丰泰基奥"; piston[7].ability=78; piston[7].weizhi[3]=true; piston[7].defen=89; piston[7].zhugong=59; piston[7].fangshou=56; piston[7].lanban=55; piston[7].R_ability=67;
	piston[8].name="以赛亚斯图尔特"; piston[8].ability=77; piston[8].weizhi[5]=true; piston[8].sanfen=82; piston[8].neixian=74; piston[8].neifang=70; piston[8].lanban=71; piston[8].R_ability=73;
	piston[9].name="马库斯萨瑟"; piston[9].ability=75; piston[9].weizhi[2]=true; piston[9].defen=85; piston[9].yundong=76; piston[9].fangshou=71; piston[9].R_ability=79;
	piston[10].name="蒂姆哈达威"; piston[10].ability=75; piston[10].weizhi[3]=true; piston[10].defen=79; piston[10].fangshou=59; piston[10].lanban=54; piston[10].zhugong=79; piston[10].R_ability=68;
	piston[11].name="马利克比斯利"; piston[11].ability=75; piston[11].weizhi[3]=true; piston[11].defen=87; piston[11].fangshou=59; piston[11].lanban=53; piston[11].zhugong=73; piston[11].R_ability=69;
	piston[12].name="小文德尔摩尔"; piston[12].ability=71; piston[12].weizhi[3]=true; piston[12].defen=71; piston[12].fangshou=71; piston[12].lanban=50; piston[12].zhugong=65; piston[12].R_ability=66;
	piston[13].name="拖桑厄沃玛"; piston[13].ability=70; piston[13].weizhi[3]=true; piston[13].defen=79; piston[13].fangshou=57; piston[13].lanban=60; piston[13].zhugong=71; piston[13].R_ability=67; 
	}
	int choose=0;
	cout<<"欢迎来到NBA闯关小游戏"<<endl<<"制作人daaaadd";
	Sleep(2000); 
	system("cls"); 
	cout<<"1.抽取球员"<<endl<<"2.退出游戏" ;
	cin>>choose;
	if(choose==1){
		system("cls"); 
		srand(time(0));
		int k=0,renshu=0;
		renshu+=1;
		cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"内防能力"<<"    "<<"内线进攻能力"<<"    "<<"三分能力"<<"    "<<"真实能力值"<<endl; 
		cout<<"中锋"<<endl;
		k=rand() % (10 - 1 + 1) + 1;
		cout<<C[k].name<<"    "<<C[k].ability<<"    "<<C[k].lanban<<"    "<<C[k].neifang<<"    "<<C[k].neixian<<"    "<<C[k].sanfen<<"    ";
		if(C[k].real==true) cout<<C[k].R_ability<<endl<<endl;
		else cout<<"未知"<<endl<<endl; 
		me[renshu].name=C[k].name; me[renshu].ability=C[k].ability; me[renshu].lanban=C[k].lanban; me[renshu].neifang=C[k].neifang; me[renshu].neixian=C[k].neixian; me[renshu].sanfen=C[k].sanfen; me[renshu].weizhi[5]=true; me[renshu].R_ability=C[k].R_ability; me[renshu].real=C[k].real;
		renshu+=1;
		Sleep(2000);
		cout<<"大前"<<endl;
		cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"协防能力"<<"    "<<"内线进攻能力"<<"    "<<"投篮能力"<<"    "<<"真实能力值"<<endl; 
		k=rand() % (10 - 1 + 1) + 1;
		cout<<PF[k].name<<"    "<<PF[k].ability<<"    "<<PF[k].lanban<<"    "<<PF[k].xiefang<<"    "<<PF[k].neixian<<"    "<<PF[k].toulan<<"    ";
		if(PF[k].real==true) cout<<PF[k].R_ability<<endl<<endl;
		else cout<<"未知"<<endl<<endl; 
		me[renshu].name=PF[k].name; me[renshu].ability=PF[k].ability; me[renshu].lanban=PF[k].lanban; me[renshu].xiefang=PF[k].xiefang; me[renshu].neixian=PF[k].neixian; me[renshu].toulan=PF[k].toulan; me[renshu].weizhi[4]=true; me[renshu].R_ability=PF[k].R_ability; me[renshu].real=PF[k].real;
		renshu+=1;
		Sleep(2000);
		cout<<"小前"<<endl;
		cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"防守能力"<<"    "<<"得分能力"<<"    "<<"助攻能力"<<"    "<<"真实能力值"<<endl; 
		k=rand() % (10 - 1 + 1) + 1;
		cout<<SF[k].name<<"    "<<SF[k].ability<<"    "<<SF[k].lanban<<"    "<<SF[k].fangshou<<"    "<<SF[k].defen<<"    "<<SF[k].zhugong<<"    ";
		if(SF[k].real==true) cout<<SF[k].R_ability<<endl<<endl;
		else cout<<"未知"<<endl<<endl; 
		me[renshu].name=SF[k].name; me[renshu].ability=SF[k].ability; me[renshu].lanban=SF[k].lanban; me[renshu].fangshou=SF[k].fangshou; me[renshu].defen=SF[k].defen; me[renshu].zhugong=SF[k].zhugong; me[renshu].weizhi[3]=true; me[renshu].R_ability=SF[k].R_ability; me[renshu].real=SF[k].real;
		renshu+=1;
		Sleep(2000);
		cout<<"分位"<<endl; 
		cout<<"名字"<<"     "<<"能力值"<<"     "<<"得分能力"<<"     "<<"防守能力"<<"    "<<"运动能力"<<"    "<<"真实能力值"<<endl; 
		k=rand() % (10 - 1 + 1) + 1;
		cout<<SG[k].name<<"    "<<SG[k].ability<<"    "<<SG[k].defen<<"    "<<SG[k].fangshou<<"    "<<SG[k].yundong<<"    ";
		if(SG[k].real==true) cout<<SG[k].R_ability<<endl<<endl;
		else cout<<"未知"<<endl<<endl; 
		me[renshu].name=SG[k].name; me[renshu].ability=SG[k].ability; me[renshu].defen=SG[k].defen; me[renshu].fangshou=SG[k].fangshou; me[renshu].yundong=SG[k].yundong; me[renshu].weizhi[2]=true; me[renshu].R_ability=SG[k].R_ability; me[renshu].real=SG[k].real;
		renshu+=1;
		Sleep(2000);
		cout<<"控卫"<<endl;
		cout<<"名字"<<"     "<<"能力值"<<"     "<<"得分能力"<<"     "<<"防守能力"<<"    "<<"运动能力"<<"    "<<"助攻能力"<<"    "<<"真实能力值"<<endl;  
		k=rand() % (10 - 1 + 1) + 1;
		cout<<PG[k].name<<"    "<<PG[k].ability<<"    "<<PG[k].defen<<"    "<<PG[k].fangshou<<"    "<<PG[k].yundong<<"    "<<PG[k].zhugong<<"    ";
		if(PG[k].real==true) cout<<PG[k].R_ability<<endl<<endl;
		else cout<<"未知"<<endl<<endl; 
		me[renshu].name=PG[k].name; me[renshu].ability=PG[k].ability; me[renshu].defen=PG[k].defen; me[renshu].fangshou=PG[k].fangshou; me[renshu].yundong=PG[k].yundong; me[renshu].zhugong=PG[k].zhugong; me[renshu].weizhi[1]=true; me[renshu].R_ability=PG[k].R_ability; me[renshu].real=PG[k].real;
		choose=0;
		Sleep(2000);
		system("cls");
		cout<<"1.继续游戏"<<endl<<"2.退出游戏"; 
		cin>>choose;
		if(choose==1){
			system("cls");
			hhh:
				choose=0;
				cout<<"1.查看球员"<<endl<<"2.调整战术"<<endl<<"3.开始闯关"; 
				cin>>choose;
				if(choose==1){
					system("cls");
					cout<<"名字"<<"    "<<"能力值"<<"    "<<"位置"<<endl; 
					for(int i=1;i<=renshu;i++){
						cout<<me[i].name<<"    "<<me[i].ability<<"    ";
						if(me[i].weizhi[1]==true) cout<<"控卫"<<endl;
						if(me[i].weizhi[2]==true) cout<<"分卫"<<endl;
						if(me[i].weizhi[3]==true) cout<<"小前"<<endl;
						if(me[i].weizhi[4]==true) cout<<"大前"<<endl;
						if(me[i].weizhi[5]==true) cout<<"中锋"<<endl; 
						Sleep(1000);
					}
					cout<<"1.查看球员详细资料"<<endl<<"2.返回首页"<<endl<<"3.退出游戏" ;
					choose=0;
					cin>>choose;
					if(choose==1){ 
						Sleep(1000); 
						system("cls");
						chakan:
							cout<<"请输入您要看的球员的序列号";
							choose=0;
							cin>>choose;
							system("cls");
							if(me[choose].weizhi[1]==true) {
								cout<<"名字"<<"     "<<"能力值"<<"     "<<"得分能力"<<"     "<<"防守能力"<<"    "<<"运动能力"<<"    "<<"助攻能力"<<"    "<<"真实能力值"<<endl;  
								cout<<me[choose].name<<"    "<<me[choose].ability<<"    "<<me[choose].defen<<"    "<<me[choose].fangshou<<"    "<<me[choose].yundong<<"    "<<me[choose].zhugong<<"    ";
								if(me[choose].real==true) cout<<me[choose].R_ability<<endl<<endl;
								else cout<<"未知"<<endl<<endl; 
								choose=0;
								cout<<"1.返回首页"<<endl<<"2.查看另一位球员"<<endl<<"3.退出游戏";
								cin>>choose;
								if(choose==1) {Sleep(1000); system("cls"); goto hhh;}
								if(choose==2) {Sleep(1000); system("cls"); goto chakan;}
								if(choose==3) {Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
							}
							if(me[choose].weizhi[2]==true){
								cout<<"名字"<<"     "<<"能力值"<<"     "<<"得分能力"<<"     "<<"防守能力"<<"    "<<"运动能力"<<"    "<<"真实能力值"<<endl; 
								cout<<me[choose].name<<"    "<<me[choose].ability<<"    "<<me[choose].defen<<"    "<<me[choose].fangshou<<"    "<<me[choose].yundong<<"    ";
								if(me[choose].real==true) cout<<me[choose].R_ability<<endl<<endl;
								else cout<<"未知"<<endl<<endl; 
								choose=0;
								cout<<"1.返回首页"<<endl<<"2.查看另一位球员"<<endl<<"3.退出游戏";
								cin>>choose;
								if(choose==1) {Sleep(1000); system("cls"); goto hhh;}
								if(choose==2) {Sleep(1000); system("cls"); goto chakan;}
								if(choose==3) {Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
							}
							if(me[choose].weizhi[3]==true){
								cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"防守能力"<<"    "<<"得分能力"<<"    "<<"助攻能力"<<"    "<<"真实能力值"<<endl; 
								cout<<me[choose].name<<"    "<<me[choose].ability<<"    "<<me[choose].lanban<<"    "<<me[choose].fangshou<<"    "<<me[choose].defen<<"    "<<me[choose].zhugong<<"    ";
								if(me[choose].real==true) cout<<me[choose].R_ability<<endl<<endl;
								else cout<<"未知"<<endl<<endl; 
								choose=0;
								cout<<"1.返回首页"<<endl<<"2.查看另一位球员"<<endl<<"3.退出游戏";
								cin>>choose;
								if(choose==1) {Sleep(1000); system("cls"); goto hhh;}
								if(choose==2) {Sleep(1000); system("cls"); goto chakan;}
								if(choose==3) {Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
							}
							if(me[choose].weizhi[4]==true){
								cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"协防能力"<<"    "<<"内线进攻能力"<<"    "<<"投篮能力"<<"    "<<"真实能力值"<<endl; 
								cout<<me[choose].name<<"    "<<me[choose].ability<<"    "<<me[choose].lanban<<"    "<<me[choose].xiefang<<"    "<<me[choose].neixian<<"    "<<me[choose].toulan<<"    ";
								if(me[choose].real==true) cout<<me[choose].R_ability<<endl<<endl;
								else cout<<"未知"<<endl<<endl; 
								choose=0;
								cout<<"1.返回首页"<<endl<<"2.查看另一位球员"<<endl<<"3.退出游戏";
								cin>>choose;
								if(choose==1) {Sleep(1000); system("cls"); goto hhh;}
								if(choose==2) {Sleep(1000); system("cls"); goto chakan;}
								if(choose==3) {Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
							}
							if(me[choose].weizhi[5]==true) {
								cout<<"名字"<<"     "<<"能力值"<<"     "<<"篮板能力"<<"     "<<"内防能力"<<"    "<<"内线进攻能力"<<"    "<<"三分能力"<<"    "<<"真实能力值"<<endl; 
								cout<<me[choose].name<<"    "<<me[choose].ability<<"    "<<me[choose].lanban<<"    "<<me[choose].neifang<<"    "<<me[choose].neixian<<"    "<<me[choose].sanfen<<"    ";
				   				if(me[choose].real==true) cout<<me[choose].R_ability<<endl<<endl;
								else cout<<"未知"<<endl<<endl; 
								choose=0;
								cout<<"1.返回首页"<<endl<<"2.查看另一位球员"<<endl<<"3.退出游戏";
								cin>>choose;
								if(choose==1) {Sleep(1000); system("cls"); goto hhh;}
								if(choose==2) {Sleep(1000); system("cls"); goto chakan;}
								if(choose==3) {Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
							}
					} 
					if(choose==2){Sleep(1000); system("cls"); goto hhh;}
					if(choose==3){Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
			}
		}
		if(choose==2){Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
	}
	if(choose==2){Sleep(2000); system("cls");  cout<<"作者:CSDN的daaaadd"<<endl<<"中国有句古话,叫识关注者魏骏杰";return 0;}
	return 0;
}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值