构造游戏代码更新
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<stdio.h>
#include<queue>
#include<iomanip>
#include<string>
#include<windows.h>
#include <conio.h>
using namespace std;
long long ditudengji;
long long liliang=20,jingshen,huo,zengliliang=0.1,zengjingshen,zenghuo,jingyan,huangjin,dui=1;
int ditudengji1[21][21]={};
/*
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,q0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,00
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,32,0,N,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0
*/
void jiazai(){
cout<<"Zhoumy制作,因为是2.0所以肯定还是非常的垃圾"<<endl<<"请各位SB(神犇)知晓"<<endl<<"还有我可能会很久在更新了......";
Sleep(400);
int a;
system("cls");
system("color 0A");
cout<<" ** * * * * "<<endl;
cout<<" ** ****** ******** "<<endl;
cout<<" **** * * *** * * "<<endl;
cout<<" ************* * * * * "<<endl;
cout<<" ************* * * * ************* "<<endl;
cout<<" ***** * * * * "<<endl;
cout<<" ** ** ** ****** * * *********** "<<endl;
cout<<" ** ** ** * * * * * "<<endl;
cout<<" ** ** ** * * * *********** "<<endl;
cout<<" ** ** ** * * ** "<<endl;
cout<<"** ** ** *** **************** "<<endl;
cout<<"按1开始游玩,按其他件默认不游玩"<<endl;
if(_getch()/*因为上方介绍为按,所以用_getch()*/=='1'/*_getch()的判定结果为字符型,且为单个字符*/){
for(int i=1;i<=3;i++)system("color 07"),system("color 17"),system("color 27"),system("color 37"),system("color 47"),system("color 57"),system("color 67"),system("color 87"),system("color 97"),system("color A7"),system("color B7"),system("color C7"),system("color D7"),system("color E7"),system("color 0F");
system("cls"),system("color 0B");
cout<<"开始!";
Sleep(500);
system("cls");
cout<<"加载时间过长,请耐心等待。"<<endl,Sleep(1000);
for(int i=0;i<50;i++){
system("cls");
switch(i/5){
case 0:cout<<"正在加载世界"<<endl;break;
case 1:cout<<"正在加载资源"<<endl;break;
case 2:cout<<"正在加载介绍"<<endl;break;
case 3:cout<<"正在加载对话"<<endl;break;
case 4:cout<<"正在加载颜色"<<endl;break;
case 5:cout<<"正在加载版本"<<endl;break;
case 6:cout<<"正在加载声音"<<endl;break;
case 7:cout<<"正在加载服务器"<<endl;break;
case 8:cout<<"正在加载存档"<<endl;break;
case 9:cout<<"正在进入章节"<<endl;//因为这是最后一个,break可以省略
}
for(int j=1;j<=i;j++){
cout<<"*";
}
Sleep(300);
}
system("color 07");
}
else{
while(1){
cout<<"我辛辛苦苦做的你竟然不玩?不!";
system("color 07");
system("color 17");
system("color E7");
}
}
}
void game(){
cout<<"1.地图 (等级"<<ditudengji<<") 2.滑块 3.技能" ;
int a;
cin>>a;
if(a==1){
cout<<"我太难了,先不做(懒得做)";
Sleep(1000);
game();
}
if(a==2){
cout<<"滑块"<<endl;
cout<<"经验"<<jingyan<<"黄金"<<huangjin<<endl<<endl;
for(int i=1;i<=dui;i++){
cout<<"第几个队伍"<<i<<"力量"<<liliang<<"精神"<<jingshen<<"火"<<huo<<endl<<endl;
}
}
if(a==3&&ditudengji==1){
cout<<"暂为解锁,请地图升级后再来。";
game();
}
if(a==3&&ditudengji!=1){
cout<<"我额额,太难做了先不做";
Sleep(1000);
}
}
void wan(){
system("cls");
cout<<"1.开始游戏 2.查看更新日志 3.Zhoumy的同学松鼠党是个蒟蒻 4.开挂 5功劳榜 6.排名榜(未开发) 请输入1-5,输入其他的我不管"<<endl;
int i;
cin>>i;
while(1){
switch(i){
case 1:
{
cout<<"惊不惊喜,意不意外...... 还是未开发!骗你的,等待10秒";
game();
}
break;
case 2:
{
cout<<"0.1版本 更新了开头、加载和正式的前边"<<endl;
cout<<"0.2版本 加入了功劳榜,开始游戏之后加入了一点东西";
cout<<"按任意键继续";
while(1){
if( kbhit()){
wan();
break;
}
}
}
case 3:while(1)cout<<"Zhoumy的同学松鼠党是个蒟蒻!"<<endl;
case 4:
{
cout<<"开挂未开发"<<endl;
cout<<"按任意键继续";
while(1){
if( kbhit()){
wan();
break;
}
}
}
break;
case 5:
{
cout<<"功劳榜!"<<endl;
cout<<"排名 名称 为什么得功劳"<<endl;
cout<<"1. Zhoumy 全程弄代码为啥不得"<<endl;
cout<<"2. ZhanPJ 提出意见和帮忙修改程序"<<endl;
cout<<"3. 无......"<<endl;
cout<<"按任意键继续";
while(1){
if( kbhit()){
wan();
break;
}
}
}
break;
default:cout<<"乱输啥?";
}
}
}
int main(){
jiazai();
wan();
return 0;
}