C++实现王者荣耀

废话不多说,直接贴源码。

#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
void QQ();
void weixin();
void pipei();
void paiwei();
void xuanyingxiong();
void pipeijiemian();
void dating(); 
 
int duanwei=1;
using namespace std;
int main()
{
	char ch='A',wei=1,qq=0;
	cout<<"-------------------------------------王者荣耀-----------------------------------"<<endl;
	cout<<"       >>[与微信好友玩]<<                                     [与QQ好友玩]      "<<endl; 
	cout<<"                                  (A,D选择,K确定)                               "<<endl; 
	while(ch!='K')
	{
		ch=getch();
		if(ch=='A')
		{
			system("cls");
			cout<<"-------------------------------------王者荣耀-----------------------------------"<<endl;
			cout<<"       >>[与微信好友玩]<<                                     [与QQ好友玩]      "<<endl; 
			cout<<"                                  (A,D选择,K确定)                               "<<endl;
			wei=1;
			qq=0;	
		}
		else if(ch=='D') 
		{
			system("cls");
			cout<<"-------------------------------------王者荣耀-----------------------------------"<<endl;
			cout<<"        [与微信好友玩]                                    >>[与QQ好友玩]<<      "<<endl; 
			cout<<"                                  (A,D选择,K确定)                               "<<endl;
			wei=0;
			qq=1;
		}
		else if(ch=='K')
			break;
	}
	if(qq)
		QQ(); 
	if(wei)
		weixin();
	cout<<"          -------------------"<<endl;
	cout<<"        -|                   |-"<<endl;
	cout<<"         |     王者荣耀      |"<<endl;
	cout<<"        -|                   |-"<<endl;
	cout<<"          -------------------"<<endl;
	cout<<"              loading";
	Sleep(1000);
	cout<<"."; 
	Sleep(1000);
	cout<<".";
	Sleep(1000);
	cout<<".";
	Sleep(1000);
	cout<<".";
	dating(); 
}
void dating() 
{
	char ch;
	system("cls"); 
	cout<<"-----------------------------------------------------------"<<endl;
	cout<<"|                       王者荣耀                          |"<<endl;
	cout<<"|无名氏:30级        金币:0    点券:0  钻石:0              |"<<endl;
	cout<<"|---------------------------------------------------------|"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|  >>匹配<<  |     排位赛      |   商店(未开放)  |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"-----------------------------------------------------------"<<endl;
	ch=getch();
	int pw=0,pp=1;
	while(ch!='K')
	{
		ch=getch();
		if(ch=='A')
		{
				system("Cls");
				cout<<"-----------------------------------------------------------"<<endl;
				cout<<"|                       王者荣耀                          |"<<endl;
				cout<<"|无名氏:30级        金币:0    点券:0  钻石:0              |"<<endl;
				cout<<"|---------------------------------------------------------|"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|  >>匹配<<  |     排位赛      |   商店(未开放)  |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"-----------------------------------------------------------"<<endl;
				pw=0;
				pp=1;	
		}
		else if(ch=='D') 
		{
				system("Cls");
				cout<<"-----------------------------------------------------------"<<endl;
				cout<<"|                       王者荣耀                          |"<<endl;
				cout<<"|无名氏:30级        金币:0    点券:0  钻石:0              |"<<endl;
				cout<<"|---------------------------------------------------------|"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|    匹配    |   >>排位赛 <<   |   商店(未开放)  |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"|            |                 |                 |        |"<<endl;
				cout<<"-----------------------------------------------------------"<<endl;
				pp=0;
				pw=1;
		}
		else if(ch=='K')
			break;
	}
	if(pp)
		pipei(); 
	if(pw)
		paiwei();
}
 
void QQ()
{
	system("cls");
	long long int z,m; 
	cout<<"--------------------------------------"<<endl;
	cout<<"账号:";
	cin>>z;
	cout<<"密码:";
	cin>>m; 
	system("cls");
}
void weixin() 
{
	system("cls");
	long long int z,m; 
	cout<<"--------------------------------------"<<endl;
	cout<<"账号:";
	cin>>z;
	cout<<"密码:";
	cin>>m; 
	system("cls");	
} 
void pipei()
{
	char ch; 
	system("cls");
	cout<<"-----------------------------------------------------------"<<endl;
	cout<<"|                       王者荣耀                          |"<<endl;
	cout<<"|无名氏:30级        金币:0    点券:0  钻石:0              |"<<endl;
	cout<<"|---------------------------------------------------------|"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"| >>5 vs 5<< |      3 vs 3     |      1 vs 1     |返回(A) |"<<endl;
	cout<<"|            |     (未开放)    |     (未开放)    |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"|            |                 |                 |        |"<<endl;
	cout<<"-----------------------------------------------------------"<<endl;
	while(ch!='A'&&ch!='K')
	{
		ch=getch();
		if(ch=='A')
			dating();
		else if(ch=='K') 
		{
			pipeijiemian();
			xuanyingxiong();
			dating(); 
		}
	}	
}
void xuanyingxiong()
{
	string xingxiong="鲁班" ; 
	char ch='T';
	while(ch!='K')
	{
		system("
  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值