绝地NBA(新增三分大赛)

在以前的基础上,我把绝地NBA新增了三分大赛~~

code

#include<bits/stdc++.h> 
#include<windows.h> 
using namespace std;

string player,moshi;
int sanfen,zhongtou,neixian,neifang,waifang;

int tops,s,s1=0,s2=0;string n,m;//王朝模式 
int score=0;string huaqiudian,hqd[5]={
   "left-corner","left-wing","top-key","right-wing","right-corner"};

int Beginning()
{
   
	cout<<"                          绝 ";
	Sleep(300);
	cout<<"地 ";
	Sleep(300);
	cout<<"N ";
	Sleep(300);
	cout<<"B ";
	Sleep(300);
	cout<<"A ";
	Sleep(1000);
	cout<<"\n\n";
	cout<<"                        ";
	cout<<"(";
	Sleep(100);
	cout<<"点";
	Sleep(100);
	cout<<"击";
	Sleep(100);
	cout<<"回";
	Sleep(100);
	cout<<"车";
	Sleep(100);
	cout<<"以";
	Sleep(100);
	cout<<"进";
	Sleep(100);
	cout<<"入";
	Sleep(100);
	cout<<")";
	Sleep(500);
	cout<<"\n                                              ";
	cout<<"P";
	Sleep(100);
	cout<<"r";
	Sleep(100);
	cout<<"o";
	Sleep(100);
	cout<<"u";
	Sleep(100);
	cout<<"d";
	Sleep(100);
	cout<<"l";
	Sleep(100);
	cout<<"y";
	Sleep(100);
	cout<<' ';
	Sleep(100);
	cout<<"p";
	Sleep(100);
	cout<<"r";
	Sleep(100);
	cout<<"o";
	Sleep(100);
	cout<<"d";
	Sleep(100);
	cout<<"u";
	Sleep(100);
	cout<<"c";
	Sleep(100);
	cout<<"e";
	Sleep(100);
	cout<<"d";
	Sleep(100);
	cout<<' ';
	Sleep(100);
	cout<<"b";
	Sleep(100);
	cout<<"y";
	Sleep(100);
	cout<<' ';
	Sleep(100);
	cout<<"Z";
	Sleep(100);
	cout<<"i";
	Sleep(100);
	cout<<"y";
	Sleep(100);
	cout<<"a";
	Sleep(100);
	cout<<"n";
	Sleep(100);
	cout<<' ';
	Sleep(100);
	cout<<"F";
	Sleep(100);
	cout<<"a";
	Sleep(100);
	cout<<"n";
	Sleep(100);
	cout<<"g";
	Sleep(100);
}

int choose()
{
   
	aa:
	getchar();
	system("cls");
	
	cout<<"请从下面几位球星中选择你最喜欢的一位:\nCurry James Antetokounmpo Durant Harden Kobe Bogut\n:";
	cin>>player; 
	
	if(player!="Curry" && player!="James" && player!="Antetokounmpo" && player\
		!="Durant" && player!="Harden" && player!="Kobe" && player!="Bogut"){
   
			system("cls");
			cout<<"搞错了,再来!";
			Sleep(2000);
			goto aa;
	}
}

int mosh()
{
   
	system("cls");
	
	cout<<"请选择模式:\n\n1、王朝模式\n2、三分大赛\n3、扣篮大赛\n\n(输入序号):"; 
	cin>>moshi;
}

int wangchao()
{
   
	Sleep(2000);
	system("cls");
	cout<<"温馨提示:进攻状态下,按1投三分,按2投两分,按3内线,按4传球!\n";
	Sleep(3000);
	cout<<"防守状态下,按1抢断,按2盖帽,按3抢篮板!\n";
	Sleep(2000);
	cout<<"现在您可以设定比赛获胜分数:";
	cin>>tops;
	
	do{
   
		system("cls");
		int qiuquan=rand()%1+1;
		cout<<"双方跳球!";
		Sleep(2000);
		
		if(qiuquan<=1)
			goto jingong;
			
		else 
			goto fangshou;
		
		jingong:
		system("cls");
		cout<<"您获得了进攻权!\n";
		Sleep(2000);
		cout<<"请做出进攻选择:";
		cin>>n;
		
		if(n=="1"){
   
			int a=rand()%39+1; //产生1~40随机数 
				
			if(sanfen-a>65){
   
				s1+=3;
				cout<<player<<"三分命中!\n现在双方比分为"<<s1<<':'<<s2<<"。"; 
				Sleep(4000);
				system("cls");
				if(s1>tops)break;
				else
				goto fangshou;
			}
				
			else{
   
				cout<<"没有命中!\n现在双方比分为"<<s1<<':'<<s2<<"。"; 
				Sleep(4000);
				system("cls");
				if(s1>tops)break;
				else
				goto fangshou;
			}
		}
		
		if(n=="2"){
   
			int a=rand()%39+1;
				
			if(zhongtou-a>65){
   
				s1+=2;
				cout<<player<<"两分打进!\n现在双方比分为"<<s1<<':'<<s2<<"。"; 
				Sleep(4000);
				system("cls");
				if(s1>tops)break;
				else
				goto fangshou;
			}
				
			else{
   
				cout<<"没有命中!\n现在双方比分为"<<s1<<':'<<s2<<"。"; 
				Sleep(4000);
				system("cls");
				if(s1>tops)break;
				else
				goto fangshou;
			}
		}
		
		if(n=="3"){
   
			int a=rand()%39+1;
			int b=rand()%2+1;
				
			if(neixian-a>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值