这是一款沙雕得不能再沙雕的
“游戏”
由于本人是一位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 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>65){
if(b<=1){
s1+=2;
cout<<player<<"来了一记暴扣!!全场沸腾了!!!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
system("cls");
if(s1>tops)break;
else
goto fangshou;
}
else{
s1+=2;
cout<<player<<"上篮命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
system("cls");
if(s1>tops)break;
else
goto fangshou;
}
}
else{
if(b<=1){
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=="4"){
system("cls");
cout<<player<<"把球传给了队友!\n\n";
Sleep(2000);
cout<<"您希望队友做什么?(输入序号)\n1、投三分 2、投两分 3、打内线 4、回传\n:";
cin>>m;
int a=rand()%2+1;
int b=rand()%1+1;
if(m=="1"){
if(a<=1){
s1+=3;
cout<<player<<"助攻队友投进三分!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
else{
cout<<"队友没能打进!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
}
if(m=="2"){
if(b<=1){
s1+=2;
cout<<player<<"助攻队友两分打进!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
else{
cout<<"队友没能打进!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
}
if(m=="3"){
if(b<=1){
s1+=2;
cout<<player<<"助攻飞队友!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
else{
cout<<"队友没能打进!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(4000);
if(s1>tops)break;
else
goto fangshou;
}
}
if(m=="4"){
cout<<"队友回传给你!";
Sleep(4000);
goto jingong;
}
}
fangshou:
system("cls");
cout<<"改防守了!\n";
Sleep(2000);
int d=rand()%4+1;
if(d<=2){
cout<<"对方打算进攻内线!\n";
Sleep(2000);
cout<<"您打算怎么做:";
cin>>n;
if(n=="1"){
system("cls");
int e=rand()%39+1;
if(waifang-e>70){
cout<<"抢断成功!";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=2;
cout<<"对方内线命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
else if(n=="2"){
system("cls");
int e=rand()%39+1;
if(neifang-e>60){
cout<<player<<"送给对手一记大帽!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=2;
cout<<"对方内线命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
}
if(d>2 && d<=3){
cout<<"对方打算投三分!\n";
Sleep(2000);
cout<<"您打算怎么做:";
cin>>n;
if(n=="1"){
system("cls");
int e=rand()%39+1;
if(waifang-e>70){
cout<<"抢断成功!";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=3;
cout<<"对方三分命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
else if(n=="2"){
system("cls");
int e=rand()%39+1;
if(neifang-e>60){
cout<<player<<"把对方干扰了!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=3;
cout<<"对方三分命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
}
else{
cout<<"对方打算投中距离!\n";
Sleep(2000);
cout<<"您打算怎么做:";
cin>>n;
if(n=="1"){
system("cls");
int e=rand()%39+1;
if(waifang-e>70){
cout<<"抢断成功!";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=2;
cout<<"对方投篮命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
else if(n=="2"){
system("cls");
int e=rand()%39+1;
if(neifang-e>60){
cout<<player<<"对对方造成严重干扰!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
else{
s2+=2;
cout<<"对方内线命中!\n现在双方比分为"<<s1<<':'<<s2<<"。";
Sleep(5000);
if(s1>tops)break;
else
goto jingong;
}
}
}
}while(s1<tops);
if(s1>s2){
cout<<"恭喜!您使用"<<player<<"带领球队获胜!";
return 0;
}
else{
cout<<"很遗憾!您输掉了比赛!";
return 0;
}
}
int sanfendasai()
{
}
int dunkslam()
{
}
int main()
{
Beginning();
choose();
system("cls");
if(player=="Bogut"){
cout<<"恭喜您,";
Sleep(1000);
cout<<"免费获得地狱入住券一张!!";
Sleep(2000);
for(int i=1;i<=10000;++i)
cout<<"chua生";
return 0;
}
else{
if(player=="Curry"){
sanfen=99;zhongtou=95;neixian=81;neifang=70;waifang=90;
}
if(player=="James"){
sanfen=85;zhongtou=91;neixian=95;neifang=90;waifang=85;
}
if(player=="Antetokounmpo"){
sanfen=79;zhongtou=83;neixian=99;neifang=95;waifang=86;
}
if(player=="Durant"){
sanfen=94;zhongtou=99;neixian=95;neifang=92;waifang=81;
}
if(player=="Harden"){
sanfen=96;zhongtou=90;neixian=89;neifang=63;waifang=79;
}
if(player=="Kobe"){
sanfen=88;zhongtou=99;neixian=96;neifang=82;waifang=99;
}
cout<<"球员数据:\n三分:"<<sanfen<<" 中投:"<<zhongtou<<" 内线:"<<neixian<<" 内防:"\
<<neifang<<" 外防:"<<waifang<<"\n\n";
Sleep(2000);
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(1000);
}
mosh();
if(moshi=="1")goto dinasty;else if(moshi=="2")goto three;else if(moshi=="3")goto dunk;
else{
system("cls");
cout<<"搞错了,再来!";
Sleep(2000);
mosh();
}
dinasty:
wangchao();
three:
sanfendasai();
dunk:
dunkslam();
return 0;
}
哦对了,我只做了王朝模式。有没有喜欢NBA的大佬给点建议,教我三分大赛和扣篮大赛怎吗做???