至CSDN支持我的人

粉丝们,我们可能有一段时间不会再见了,因为,我可能要暂时断更了,没有点赞和评论,我挣得受不了,呜呜呜😭😭😭😭,在长时间断更开始之前,我要给你们断更前的前最后几个代码,😭😭😭

目录


1.吓唬你的蓝屏,但是不是太吓唬人,刚开始可能会吓他一震子

#include<bits/stdc++.h>
using namespace std;
int main()
{
	system("color 17"); 
	system("title  ");
	cout<<"a problem has been detected and windows has been shut down to prevent damage to your computer."<<endl<<endl;
	cout<<"BUGCODE_USB_DRIVERIf"<<endl<<endl;
	cout<<"this is the first time you've seen this Stop error screen,restart your computer.If this screen appears again,follow these steps:"<<endl<<endl;
	cout<<"Check to make sure any new hardware or software is properly installed.If this is a new installation,ask your hardware or software manufacturer for any windows updates you might need."<<endl<<endl;
	cout<<"If problems continue,disable or remove any newly installed hardware or software.Disable BIOS memory options such as caching or shadowing.If you need to use safe mode to remove or disable components,restart your computer,press F8 to select advanced startup options,and then select safe mode."<<endl<<endl;
	cout<<"Technical information:"<<endl<<endl;
	cout<<"*** STOP: 0x000000FE (0x00000008,0x00000006,0x00000005,0x883459D8)"<<endl<<endl;
	cout<<"*** ndis.sys - Address 0xfffff88001d30cd3 base at 0xfffff88001cfe000 DateStamp 0x510cbf05"<<endl<<endl;
	cout<<"*** STOP: 0x000000d1 (0x0000000000000028, 0x0000000000000002, 0x0000000000000001, 0xfffff88001d30cd3)"<<endl<<endl;
	cout<<"The problem seems to be caused by the following file: ndis.sys"<<endl<<endl;
	cout<<"A problem has been detected and Windows has been shut down to prevent damage to your computer."<<endl<<endl;
	cout<<"If this is the first time you've seen this stop error screen,restart your computer.If this screen appears again,follow these steps:"<<endl<<endl;
	cout<<"Check to be sure you have adequate disk space.If a driver is identified in the stop message,disable the driver or check with the manufacturer for driver updates.Try changing video adapterscheck with your hardware vendor for any BIOS updates.Disable BIOS memory options such as caching or shadowing if you need tu use safe Mode to remove or disable components,restart your computer.Press F8 to select advanced startup options,and then select safe mode"<<endl<<endl;
	cout<<"Techical information:*** stop:0×0000008E (0×0000005,0×805F91E2,0×B3EE79A8,0×00000000)"<<endl<<endl;
	cout<<"a problem has been detected and windows has been shut down to prevent damage to your computer."<<endl<<endl;
	cout<<"BUGCODE_USB_DRIVERIf"<<endl<<endl;
	cout<<"this is the first time you've seen this Stop error screen,restart your computer.If this screen appears again,follow these steps:"<<endl<<endl;
	cout<<"Check to make sure any new hardware or software is properly installed.If this is a new installation,ask your hardware or software manufacturer for any windows updates you might need."<<endl<<endl;
	cout<<"If problems continue,disable or remove any newly installed hardware or software.Disable BIOS memory options such as caching or shadowing.If you need to use safe mode to remove or disable components,restart your computer,press F8 to select advanced startup options,and then select safe mode."<<endl<<endl;
	cout<<"Technical information:"<<endl<<endl;
	cout<<"*** STOP: 0x000000FE (0x00000008,0x00000006,0x00000005,0x883459D8)"<<endl<<endl;
	cout<<"*** ndis.sys - Address 0xfffff88001d30cd3 base at 0xfffff88001cfe000 DateStamp 0x510cbf05"<<endl<<endl;
	cout<<"*** STOP: 0x000000d1 (0x0000000000000028, 0x0000000000000002, 0x0000000000000001, 0xfffff88001d30cd3)"<<endl<<endl;
	cout<<"The problem seems to be caused by the following file: ndis.sys"<<endl<<endl;
	cout<<"A problem has been detected and Windows has been shut down to prevent damage to your computer."<<endl<<endl;
	cout<<"If this is the first time you've seen this stop error screen,restart your computer.If this screen appears again,follow these steps:"<<endl<<endl;
	cout<<"Check to be sure you have adequate disk space.If a driver is identified in the stop message,disable the driver or check with the manufacturer for driver updates.Try changing video adapterscheck with your hardware vendor for any BIOS updates.Disable BIOS memory options such as caching or shadowing if you need tu use safe Mode to remove or disable components,restart your computer.Press F8 to select advanced startup options,and then select safe mode"<<endl<<endl;
	cout<<"Techical information:*** stop:0×0000008E (0×0000005,0×805F91E2,0×B3EE79A8,0×00000000)"<<endl<<endl;
	return 0;
}

2.我的世界C++低配版,按Q有惊喜

#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h> 
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
int fallspeed;
int jumpspeed = -3;
int gravity = 1;
int y = 400, x = 500;
int restartposy, restartposx, face, health = 1000, lasthealth = 1000, breath = 100, hungry = 1000, dienum;
bool attack, defense, hurt, mode;
struct TNT
{
	int y;
	int x;
	int time;
	bool issave;
};
struct BLOCK
{
	int color;
	string ch;
	string type;
};
struct MOB
{
	int fallspeed;
	int health;
	bool hurt;
	int y;
	int x;
	int attack;
	string shap;
	bool isenemy;
	int color;
	string name;
};
struct ARROW
{
	string shap;
	double y;
	double x;
	double fallspeed;
	double plusx;
};
TNT tnt[20];
string die;
ARROW arrow[100];
MOB mobs[50] = {
	{0,1000,0,0,0,100,"危",true,7,"危"},
	{0,10,0,0,0,10,"  ",true,7,"  "},
	{0,1000,0,0,0,100,"MM",false,7,"MM"},
	{0,100000,0,90,70,-100,"AC",true,7,"Accept"},
	{0,10000,0,90,70,500,"BO",true,7,"BOSS"},
	{0,100000,0,90,70,-1000,"AK",true,7,"AK"},
};
MOB mob[100] = {
	{0,1000,0,92,4,100,"WA",true,7,"Wrong Anwser"},
	{0,1000,0,92,4,100,"TL",true,7,"Time Limit Error"},
	{0,2000,0,92,4,300,"CE",true,7,"Compile Error"},
	{0,1000,0,45,9,100,"WA",true,7,"Wrong Anwser"},
	{0,100000,0,90,70,-100,"AC",true,7,"Accept"},
	{0,100000,0,90,70,-1000,"AK",true,7,"AK"},
	{0,10000,0,90,70,500,"UK",true,7,"Unknown Error"},
	{0,1000,0,92,3,0,"MM",false,7,"MM"},
	{0,1000,0,92,3,0,"MM",false,7,"MM"},
	{0,1000,0,90,15,0,"MM",false,7,"MM"},
	{0,1000,0,90,80,0,"MM",false,7,"MM"},
};
BLOCK block[32] = {
	{0,"  ","air"},//空气
	{6,"██","block"},//土块
	{8,"██","block"},//石头
	{2,"██","block"},//草方块
	{15,"██","block"},//雪块 
	{4,"██","block"},//岩浆块
	{14,"▓▓","fallblock"},//沙块 
	{8,"II","fallblock"},//铁砧
	{9,"██","water"},//水
	{9,"▇▇","water"},//水
	{9,"▆▆","water"},//水
	{9,"▅▅","water"},//水
	{9,"▄▄","water"},//水
	{9,"▃▃","water"},//水
	{9,"▂▂","water"},//水
	{9,"▁▁","water"},//水
	{12,"██","lava"},//岩浆
	{12,"▇▇","lava"},//岩浆
	{12,"▆▆","lava"},//岩浆
	{12,"▅▅","lava"},//岩浆
	{12,"▄▄","lava"},//岩浆
	{12,"▃▃","lava"},//岩浆
	{12,"▂▂","lava"},//岩浆
	{12,"▁▁","lava"},//岩浆  
	{12,"危","background"},//危
	{6,"██","background"},//木头
	{10,"▓▓","background"},//树叶 
	{15,"▓▓","background"},//带雪树叶
	{15,"▅▅","bomb"},//TNT爆炸 
	{12,"Ⅲ","TNT"},//TNT
	{7,"Ⅲ","TNT"},//TNT2
	{6,"∷","ladder"},//梯子
};
int board[1005][1005];
int setboard[1005][1005];
int bag[100];
int clear_buffer()
{
	while(kbhit())
	{
		if(getch() != EOF); 
		for(int i = 1; i <= 256; i++)
		{
			if(GetAsyncKeyState(i));
		}
	}
	return 0;
}
void color(int a)
{
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
/*	1	深蓝色
	2	深绿色
	3	深青色 
	4	深红色
	5	深粉色
	i	黄色
	7	深白色
	8	灰色
	9	浅蓝色
	10	浅绿色 
	11	浅青色 
	12	浅红色 
	13	浅粉色 
	14	浅黄色 
	15	浅白色 
	背景
	1~15		黑色 
	16~31		深蓝色 
	32~47		深绿色
	48~63		深青色
	64~79		深红色
	'S'~95		深粉色
	96~111		深黄色
	112~127 	深白色
	128~143 	灰色
	144~159 	浅蓝色
	160~1'A' 	浅绿色
	176~191 	浅青色
	192~207 	浅红色
	208~223 	浅粉色
	224~239 	浅黄色
	240~255 	浅白色
*/
}
int init()
{
	for(int j = 0; j < 100; j++)
	{
		bag[j] = 0;
	}
	for(int i = 0; i < 1000; i++)
	{
		for(int j = 0; j < 1000; j++)
		{
			board[i][j] = 0;
		}
	} 
	double lasty = rand() % 101 + 400;
	for(int i = 5; i < 1000; i += 5)
	{
		double y = rand() % 21 - 10 + lasty;
		y = min(450.0, y);
		double high = lasty;
		int dirt = rand() % 5 + 2;
		for(int j = i - 5; j < i; j++)
		{
			high += (y - lasty) / 5;//high每次增加差距的1/5
			for(int k = 999; k >= (int)high; k--)
			{
				if(k == (int)high)//如果是最高点 
				{
					setboard[k][j] = 3;//就用草地 
					if(high <= 350)//如果high比较高 
					{
						setboard[k][j] = 4;//就用雪地
					}
				}
				else if(k - dirt <= (int)high)//泥土 
				{
					setboard[k][j] = 1;
				}
				else 
				{
					setboard[k][j] = 2;//石头 
				}
			}
		}
		lasty = y;//赋值 
	}
	//再来一边,填满最后几格
	int dirt = rand() % 5 + 2;
	double high = lasty;
	for(int j = 995; j < 999; j++)
	{
		for(int k = 999; k >= (int)high; k--)
		{
			if(k == (int)high)
			{
				setboard[k][j] = 3;
				if(high <= 350)
				{
					setboard[k][j] = 4;
				}
			}
			else if(k - dirt <= (int)high)
			{
				setboard[k][j] = 1;
			}
			else 
			{
				setboard[k][j] = 2;
			}
		}
	}
	//填满水,这里默认把海平面高度设为410。
	for(int i = 0; i < 1000; i++)
	{
		for(int j = 600; j >= 410; j--)
		{
			if(setboard[j][i] == 0)
			{
				setboard[j][i] = 8;
			}
		}
	}
	//沙子 
	for(int i = 0; i < 1000; i++)
	{
		bool a = 0;
		for(int j = 999; j >= 0; j--)
		{
			if(a && setboard[j][i] != 0  && setboard[j][i] != 8)
			{
				setboard[j][i] = 6;
				continue;
			}
			if(setboard[j][i] == 8)
			{
				continue;
			}
			if(setboard[j][i + 3] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j][i + 2] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j][i + 1] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j][i - 1] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j][i - 2] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j][i - 3] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j - 2][i] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j - 1][i] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j - 3][i] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
			if(setboard[j - 4][i] == 8)
			{
				a = true;
				setboard[j][i] = 6;
			}
		}
	}
	//树 
	for(int i = 0; i < 1000; i++)
	{
		for(int j = 0; j < 1000; j++)
		{
			if(setboard[j][i] == 0 && block[setboard[j + 1][i]].type == "block")
			{
				if(rand() % 10 == 1)
				{
					setboard[j][i] = 25;
					setboard[j - 1][i] = 25;
					setboard[j - 2][i] = 25;
					setboard[j - 3][i] = 25;
					setboard[j - 3][i + 1] = 26;
					setboard[j - 3][i - 1] = 26;
					setboard[j - 4][i + 2] = 26; 
					setboard[j - 4][i + 1] = 26;
					setboard[j - 4][i] = 26;
					setboard[j - 4][i - 1] = 26;
					setboard[j - 4][i - 2] = 26;
					setboard[j - 5][i + 2] = 26;
					setboard[j - 5][i + 1] = 26;
					setboard[j - 5][i] = 26;
					setboard[j - 5][i - 1] = 26;
					setboard[j - 5][i - 2] = 26;
					setboard[j - 6][i + 1] = 26;
					setboard[j - 6][i] = 26;
					setboard[j - 6][i - 1] = 26;
					if(j <= 350)
					{
						setboard[j - 3][i + 1] = 27;
						setboard[j - 3][i - 1] = 27;
						setboard[j - 4][i + 2] = 27; 
						setboard[j - 4][i + 1] = 27;
						setboard[j - 4][i] = 27;
						setboard[j - 4][i - 1] = 27;
						setboard[j - 4][i - 2] = 27;
						setboard[j - 5][i + 2] = 27;
						setboard[j - 5][i + 1] = 27;
						setboard[j - 5][i] = 27;
						setboard[j - 5][i - 1] = 27;
						setboard[j - 5][i - 2] = 27;
						setboard[j - 6][i + 1] = 27;
						setboard[j - 6][i] = 27;
						setboard[j - 6][i - 1] = 27;
					}
				}
			}
		}
	} 
	//地洞 
	for(int j = 999; j >= 700; j--)
	{
		if(rand() % 20 == 1)
		{
			setboard[j - 3][2] = 0;
			setboard[j - 2][2] = 0; setboard[j - 2][3] = 0;
			setboard[j - 1][2] = 0; setboard[j - 1][3] = 0; setboard[j - 1][4] = 0;
			setboard[j][2] = 0; setboard[j][3] = 0; setboard[j][4] = 0; setboard[j][5] = 0;
			setboard[j + 1][2] = 0; setboard[j + 1][3] = 0; setboard[j + 1][4] = 0;
			setboard[j + 2][2] = 0; setboard[j + 2][3] = 0;
			setboard[j + 3][2] = 0;
		}
	}
	for(int i = 3; i < 997; i++)
	{
		for(int j = 996; j >= 500; j--)
		{
			if(block[setboard[j + 3][i]].type == "block" && block[setboard[j - 3][i]].type == "block" && setboard[j][i] == 0 && setboard[j + 1][i] == 0 && setboard[j + 2][i] == 0 && setboard[j - 1][i] == 0  && setboard[j - 2][i] == 0)
			{
				j += rand() % 5 - 2;
				j = max(3, j);
				j = min(996, j);
				if(rand() % 500 <= 499)
				{
					setboard[j - 3][i] = 0;
					setboard[j - 2][i - 1] = 0; setboard[j - 2][i] = 0; setboard[j - 2][i + 1] = 0;
					setboard[j - 1][i - 2] = 0; setboard[j - 1][i - 1] = 0; setboard[j - 1][i] = 0; setboard[j - 1][i + 1] = 0; setboard[j - 1][i + 2] = 0;
					setboard[j][i - 3] = 0; setboard[j][i - 2] = 0; setboard[j][i - 1] = 0; setboard[j][i] = 0; setboard[j][i + 1] = 0; setboard[j][i + 2] = 0; setboard[j][i + 3] = 0;
					setboard[j + 1][i - 2] = 0; setboard[j + 1][i - 1] = 0; setboard[j + 1][i] = 0; setboard[j + 1][i + 1] = 0; setboard[j + 1][i + 2] = 0;
					setboard[j + 2][i - 1] = 0; setboard[j + 2][i] = 0; setboard[j + 2][i + 1] = 0;
					setboard[j + 3][i] = 0;
					if(rand() % 20 == 1)
					{
						for(int k = 0; k < 100; k++)
						{
							if(mob[k].shap == "")
							{
								mob[k] = {0,1000,0,0,0,100,"SS",true,7,"僵尸"};
								mob[k].x = i;
								mob[k].y = j;
								break;
							}
						}
					}
				}
			}
			else if(block[setboard[j + 3][i]].type == "block" && block[setboard[j + 2][i]].type == "block" && block[setboard[j + 1][i]].type == "block" && block[setboard[j][i]].type == "block" && block[setboard[j - 1][i]].type == "block" && block[setboard[j - 2][i]].type == "block" && block[setboard[j - 3][i]].type == "block")
			{
				if(rand() % 500 == 1)
				{
					setboard[j - 3][i] = 0;
					setboard[j - 2][i - 1] = 0; setboard[j - 2][i] = 0; setboard[j - 2][i + 1] = 0;
					setboard[j - 1][i - 2] = 0; setboard[j - 1][i - 1] = 0; setboard[j - 1][i] = 0; setboard[j - 1][i + 1] = 0; setboard[j - 1][i + 2] = 0;
					setboard[j][i - 3] = 0; setboard[j][i - 2] = 0; setboard[j][i - 1] = 0; setboard[j][i] = 0; setboard[j][i + 1] = 0; setboard[j][i + 2] = 0; setboard[j][i + 3] = 0;
					setboard[j + 1][i - 2] = 0; setboard[j + 1][i - 1] = 0; setboard[j + 1][i] = 0; setboard[j + 1][i + 1] = 0; setboard[j + 1][i + 2] = 0;
					setboard[j + 2][i - 1] = 0; setboard[j + 2][i] = 0; setboard[j + 2][i + 1] = 0;
					setboard[j + 3][i] = 0;
				}
			}
		}
	}
	//出生点 
	bool a = false;
	for(int i = 400; i < 1000; i++)
	{
		for(int j = 0; j < 1000; j++)
		{
			if(setboard[j][i] == 0 && block[setboard[j + 1][i]].type == "block" && (setboard[j + 1][i] == 3 || setboard[j + 1][i] == 4))
			{
				restartposy = j;
				restartposx = i;
				y = j;
				x = i;
				a = true;
				break;
			}
		}
		if(a)
		{
			break;
		}
	}
	return 0;
}
int Arrowmove()
{
	for(int i = 0; i < 100; i++)
	{
		if(arrow[i].shap == "")
		{
			continue;
		}
		arrow[i].x += (int)arrow[i].plusx;
		arrow[i].plusx -= 0.1;
		for(int j = (int)arrow[j].y + 1; j <= (int)arrow[j].y + (int)arrow[j].fallspeed; j++)
		{
			if(block[board[j][(int)arrow[j].x]].type == "block" || block[board[j][(int)arrow[j].x]].type == "fallblock")
			{
				arrow[i].fallspeed = 0;
				return 0;
			}
		}
		arrow[i].y += arrow[i].fallspeed;
		arrow[i].fallspeed += 0.1;
		if(arrow[i].y > 999)
		{
			arrow[i].shap = "";
		}
		if(block[board[(int)arrow[i].y + 1][(int)arrow[i].x]].type == "block" || block[board[(int)arrow[i].y + 1][(int)arrow[i].x]].type == "fallblock")
		{
			arrow[i].shap = "";
		}
	}
	return 0;
}
int mobmove()
{
	for(int j = 0; j < 100; j++)
	{
		if(mob[j].shap == "")
		{
			continue;
		}
		mob[j].hurt = false;
		mob[j].color = 7;
		if(mob[j].health <= 0 || mob[j].y > 999)
		{
			mob[j].shap = "";
			mob[j].color = 7;
			continue;
		}
		if(block[board[mob[j].y][mob[j].x]].type == "lava")
		{
			mob[j].health -= 200;
			mob[j].hurt = true;
		}
		else if((board[mob[j].y + 1][mob[j].x] == 5) || ((mob[j].y == y || mob[j].y == y - 1) && (mob[j].x == x + 1 || mob[j].x == x || mob[j].x == x - 1) && KEY_DOWN(' ')))
		{
			mob[j].health -= 100;
			mob[j].hurt = true;
		}
		if(mob[j].y == y && mob[j].x == x && mob[j].isenemy)
		{
			health -= mob[j].attack;
			hurt = true;
			die = "被 " + mob[j].name + " 杀死了";
		}
		for(int i = mob[j].y - 1; i >= mob[j].y + mob[j].fallspeed; i--)
		{
			if(block[board[i - 1][mob[j].x]].type == "block")
			{
				mob[j].fallspeed = 0 - mob[j].y + i + 1;
				return 0;
			}
		}
		for(int i = mob[j].y + 1; i <= mob[j].y + mob[j].fallspeed; i++)
		{
			if(block[board[i][mob[j].x]].type == "block" || block[board[i][mob[j].x]].type == "fallblock")
			{
				if(mob[j].fallspeed >= 5 && block[board[i - 1][mob[j].x]].type == "water")
				{
					mob[j].health -= 50 * (mob[j].fallspeed - 4);
					mob[j].hurt = true;
				}
				mob[j].fallspeed = 0;
				return 0;
			}
		}
		mob[j].y += mob[j].fallspeed;
		mob[j].fallspeed += gravity;
		if(mob[j].isenemy)
		{
			if(mob[j].y > y && (block[board[mob[j].y + 1][mob[j].x]].type == "block" || block[board[mob[j].y + 1][mob[j].x]].type == "fallblock"))
			{
				if(mob[j].y > y + 50)
				{
					mob[j].fallspeed = -7;
				}
				mob[j].fallspeed = -3;
			}
			if(mob[j].x < x)
			{
				if(block[board[mob[j].y][mob[j].x + 1]].type != "block" || block[board[mob[j].y][mob[j].x + 1]].type != "fallblock")
				{
					mob[j].x++;
				}
				else if(block[board[mob[j].y + 1][mob[j].x]].type == "block" || block[board[mob[j].y + 1][mob[j].x]].type != "fallblock")
				{
					mob[j].fallspeed = -3;
				}
			}
			else if(mob[j].x > x)
			{
				if(block[board[mob[j].y][mob[j].x - 1]].type != "block" || block[board[mob[j].y][mob[j].x - 1]].type != "fallblock")
				{
					mob[j].x--;
				}
				else if(block[board[mob[j].y + 1][mob[j].x]].type == "block" || block[board[mob[j].y + 1][mob[j].x]].type != "fallblock")
				{
					mob[j].fallspeed = -3;
				}
			}
		}
		else
		{
			if(rand() % 3 == 0)
			{
				if(block[board[mob[j].y][mob[j].x + 1]].type != "block" || block[board[mob[j].y][mob[j].x + 1]].type != "fallblock")
				{
					mob[j].x++;
				}
				else if(block[board[mob[j].y + 1][mob[j].x]].type == "block" || block[board[mob[j].y + 1][mob[j].x]].type != "fallblock")
				{
					mob[j].fallspeed = -3;
				}
			}
			else if(rand() % 3 == 1)
			{
				if(block[board[mob[j].y][mob[j].x - 1]].type != "block" || block[board[mob[j].y][mob[j].x - 1]].type != "fallblock")
				{
					mob[j].x--;
				}
				else if(block[board[mob[j].y + 1][mob[j].x]].type == "block" || block[board[mob[j].y + 1][mob[j].x]].type != "fallblock")
				{
					mob[j].fallspeed = -3;
				}
			}
		}
		if(mob[j].hurt)
		{
			mob[j].color = 12;
		}
	}
	return 0;
}
int print()
{
	if(!mode)
	{
		color(8);
		cout << "HP:";
		color(12);
		cout << health << endl; 
		for(int i = 0; i < health; i += 100)
		{
			cout << "◆";
		}
		color(7);
		for(int i = health; i < lasthealth; i += 100)
		{
			cout << "◇";
		}
		cout << endl;
		color(8);
		cout << "AIR:";
		color(11);
		cout << breath << endl;
		for(int i = 0; i < breath; i += 10)
		{
			cout << "●";
		}
		for(int i = breath; i < 91; i += 10)
		{
			cout << "○";
		}
		cout << endl;
		color(8);
		cout << "HUNGRY:";
		color(14);
		cout << hungry << endl;
		for(int i = 0; i < hungry; i += 100)
		{
			cout << "§";
		}
		cout << endl;
	} 
	color(8);
	cout << "DIENUM:";
	color(4);
	cout << dienum << endl;
	for(int i = y - 6; i <= y + 6; i++)
	{
		for(int j = x - 6; j <= x + 6; j++)
		{
			bool ismob = false;
			for(int s = 0; s < 100; s++)
			{
				if(mob[s].shap == "")
				{
					continue;
				}
				else if(mob[s].x == j && mob[s].y == i)
				{
					color(mob[s].color);
					cout << mob[s].shap;
					ismob = true;
					break;
				}
			}
			if(ismob)
			{
				continue;
			}
			for(int s = 0; s < 100; s++)
			{
				if(arrow[s].shap == "")
				{
					continue;
				}
				else if((int)arrow[s].x == j && (int)arrow[s].y == i)
				{
					color(7);
					cout << arrow[s].shap;
					ismob = true;
					break;
				}
			}
			if(ismob)
			{
				continue;
			}
			else if(i == y && j == x)
			{
				if (KEY_DOWN('S'))
				{
					color(14);
					if(hurt)
					{
						color(12);
					}
					cout << "()";
				}
				else
				{
					color(9);
					if(hurt)
					{
						color(12);
					}
					cout << "∏";
				}
			}
			else if(i == y - 1 && j == x)
			{
				if (!KEY_DOWN('S'))
				{
					color(14);
					if(hurt)
					{
						color(12);
					}
					cout << "()";
				}
				else
				{
					color(block[board[i][j]].color);
					cout << block[board[i][j]].ch;
				}
			}
			else
			{
				if(i < 0 || i >= 1000 || j < 0 || j >= 1000)
				{
					cout << "  ";
					continue;
				}
				color(block[board[i][j]].color);
				cout << block[board[i][j]].ch;
			}
		}
		cout << endl;
	}
	color(7);
	cout << "Y:";
	color(6);
	cout << 1000 - y << endl;
	color(7);
	cout << "X:";
	color(6);
	cout << x << endl;
	return 0;
}
int move()
{
	if(board[y][x] == 31)
	{
		y += fallspeed;
		return 0;
	}
	if(block[board[y][x]].type == "water")
	{
		if(fallspeed > 1)
		{
			fallspeed = 1;
		}
	}
	else
	{
		for(int i = y - 1; i >= y + fallspeed; i--)
		{
			if(block[board[i - 1][x]].type == "block" || block[board[i - 1][x]].type == "fallblock")
			{
				fallspeed = 0 - y + i + 1;
				return 0;
			}
		}
	}
	for(int i = y + 1; i <= y + fallspeed; i++)
	{
		if(block[board[i][x]].type == "block" || block[board[i][x]].type == "fallblock")
		{
			if(fallspeed >= 5 && block[board[i - 1][x]].type != "water")
			{
				health -= 50 * (fallspeed - 4);
				if(fallspeed >= 7)
				{
					die = "落地过猛!";
				}
				else
				{
					die = "从高处摔了下来!";
				}
				hurt = true;
			}
			fallspeed = 0;
			return 0;
		}
	}
	y += fallspeed;
	fallspeed += gravity;
	return 0;
}
int bomb()
{
	for(int i = 0; i < 20; i++)
	{
		if(tnt[i].time == 0)
		{
			int atk = 0;
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 4)
			{
				atk = 50;
				fallspeed -= 1;
				x += x - tnt[i].x;
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 3)
			{
				atk = 100;
				fallspeed -= 2;
				x += x - tnt[i].x;
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 2)
			{
				atk = 300;
				fallspeed -= 4;
				x += 2 * (x - tnt[i].x);
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 1)
			{
				atk = 500;
				fallspeed -= 7;
				x += 5 * (x - tnt[i].x);
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 0)
			{
				atk = 800;
				fallspeed -= 10;
			}
			tnt[i].time--;
			if(!tnt[i].issave)
			{
				health -= atk;
			}
			die = "被TNT炸死了";
			if(atk > 0 && !tnt[i].issave)
			{
				hurt = true;
			}
			if(!tnt[i].issave)
			{
				for(int yy = tnt[i].y - 3; yy <= tnt[i].y + 3; yy++)
				{
					for(int xx = tnt[i].x - 3; xx <= tnt[i].x + 3; xx++)
					{
						if((int)(sqrt(abs(yy - tnt[i].y) * abs(yy - tnt[i].y) + abs(xx - tnt[i].x) * abs(xx - tnt[i].x)) + 0.9999) == 3)
						{
							setboard[yy][xx] = 28;
						}
						if((int)(sqrt(abs(yy - tnt[i].y) * abs(yy - tnt[i].y) + abs(xx - tnt[i].x) * abs(xx - tnt[i].x)) + 0.9999) < 3)
						{
							setboard[yy][xx] = 0;
						}
					}
				}
			}
		}
		else if(tnt[i].time == -1)
		{
			setboard[tnt[i].y][tnt[i].x] = 0;
			if(!tnt[i].issave)
			{
				for(int yy = tnt[i].y - 3; yy <= tnt[i].y + 3; yy++)
				{
					for(int xx = tnt[i].x - 3; xx <= tnt[i].x + 3; xx++)
					{
						if((int)(sqrt(abs(yy - tnt[i].y) * abs(yy - tnt[i].y) + abs(xx - tnt[i].x) * abs(xx - tnt[i].x)) + 0.9999) <= 3)
						{
							setboard[yy][xx] = 0;
						}
					}
				}
			}
			tnt[i].time--;
		}
		else if(tnt[i].time > 0)
		{
			tnt[i].time--;
			if(tnt[i].time % 2 == 0)
			{
				setboard[tnt[i].y][tnt[i].x] = 29;
			}
			else
			{
				setboard[tnt[i].y][tnt[i].x] = 30;
			}
		}
	}
	return 0;
}
int check()
{
	for(int i = 0; i < 1000; i++)
	{
		for(int j = 0; j < 1000; j++)
		{
			if(block[board[i][j]].type == "water" && board[i][j] != 15)
			{
				if(board[i + 1][j] == 0)
				{
					setboard[i + 1][j] = board[i][j];
					setboard[i + 1][j] = 8;
				}
				else if(block[board[i + 1][j]].type == "lava")
				{
					setboard[i + 1][j] = 2;
				}
				else if(block[board[i + 1][j]].type == "block" || block[board[i + 1][j]].type == "fallblock")
				{
					if(board[i][j + 1] == 0)
					{
						setboard[i][j + 1] = board[i][j] + 1;
					}
					else if(block[board[i][j + 1]].type == "lava")
					{
						setboard[i][j + 1] = 2;
					}
					if(board[i][j - 1] == 0)
					{
						setboard[i][j - 1] = board[i][j] + 1;
					}
					else if(block[board[i][j - 1]].type == "lava")
					{
						setboard[i][j - 1] = 2;
					}
				}
			}
			if(block[board[i][j]].type == "lava" && board[i][j] != 23)
			{
				if(board[i + 1][j] == 0)
				{
					setboard[i + 1][j] = board[i][j];
					setboard[i + 1][j] = 16;
				}
				else if(block[board[i + 1][j]].type == "water")
				{
					setboard[i + 1][j] = 2;
				}
				else if(block[board[i + 1][j]].type == "block" || block[board[i + 1][j]].type == "fallblock")
				{
					if(board[i][j + 1] == 0)
					{
						setboard[i][j + 1] = board[i][j] + 1;
					}
					else if(block[board[i][j + 1]].type == "water")
					{
						setboard[i][j + 1] = 2;
					}
					if(board[i][j - 1] == 0)
					{
						setboard[i][j - 1] = board[i][j] + 1;
					}
					else if(block[board[i][j - 1]].type == "water")
					{
						setboard[i][j - 1] = 2;
					}
				}
			}
			if(block[board[i][j]].type == "fallblock")
			{
				if(board[i + 2][j] == 0 && board[i + 1][j] == 0 && i + 2 < 100)
				{
					setboard[i][j] = 0;
					setboard[i + 2][j] = board[i][j];
					if(board[i][j] == 7 && j == x && i + 2 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
				}
				else if(board[i + 1][j] == 0 && i + 1 < 100)
				{
					setboard[i][j] = 0;
					setboard[i + 1][j] = board[i][j];
					if(board[i][j] == 7 && j == x && i + 1 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
					else if(board[i][j] == 7 && j == x && i + 2 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
				}
			}
		}
	}
	for(int i = 0; i < 1000; i++)
	{
		for(int j = 0; j < 1000; j++)
		{
			board[i][j] = setboard[i][j];
		}
	}
}
int main()
{
	srand((int)time(0));
	for(int i = 0; i < 20; i++)
	{
		tnt[i].time = -2;
	}
	init();
	while(1)
	{
		system("cls");
		if(!mode)
		{
			move();
		} 
		if(KEY_DOWN('F'))
		{
			setboard[y + 1][x] = 2;
		}
		check();
		bomb();
		Arrowmove();
		mobmove();
		if(mode)
		{
			hurt = false;
		} 
		print();
		Sleep(30);
		hungry--;
		hungry = max(hungry, 0);
		if(hungry == 0)
		{
			die = "被饿死了";
			hurt = true;
			health -= 10;
		}
		if(mode)
		{
			health = 1000;
		}
		if(health <= 0)
		{
			Sleep(500); 
			system("cls");
			color(12);
			cout << "           GAME OVER           " << endl;
			color(7);
			cout << "   STEVE " << die << endl;
			dienum++;
			Sleep(2000);
			x = restartposx;
			y = restartposy;
			health = 1000;
			hungry = 1000;
			breath = 100;
			fallspeed = 0;
		}
		health += (hungry + 201) / 300; 
		if(health > 1000)
		{
			health = 1000; 
		} 
		if(attack)
		{
			attack = 0;
		}
		if(defense)
		{
			defense = 0;
		}
		if(hurt)
		{
			hurt = false;
			lasthealth = health;
		}
		if(block[board[y][x]].type == "water")
		{
			fallspeed = 1;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
		}
		if(block[board[y - 1][x]].type == "water")
		{
			die = "被水淹死了!"; 
			breath--; 
		}
		else
		{
			breath++; 
			if(breath > 100)
			{
				breath = 100; 
			} 
		} 
		if(board[y][x] == 31)
		{
			fallspeed = 0;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
			if(KEY_DOWN('S'))
			{
				fallspeed = 1;
			}
		}
		if(block[board[y][x]].type == "lava")
		{
			fallspeed = 1;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
			die = "试图在岩浆里游泳!"; 
			hurt = true;
			health -= 100; 
		}
		if (KEY_DOWN('W') && !KEY_DOWN('S'))
		{
			if(mode)
			{
				y--;
			}
			else
			{
				if(block[board[y][x]].type != "water" && board[y][x] != 31)
				{
					if(block[board[y + 1][x]].type == "block" || block[board[y + 1][x]].type == "fallblock")
					{
						fallspeed = jumpspeed;
					}
				}
			}
		}
		if (KEY_DOWN('A'))
		{
			if((block[board[y][x - 1]].type != "block" && block[board[y][x - 1]].type != "fallblock") || mode)
			{
				if(KEY_DOWN('S') || (block[board[y - 1][x - 1]].type != "block" && block[board[y - 1][x - 1]].type != "fallblock") || mode)
				{
					x -= 1;
				}
			}
			face = -1;
		}
		if (KEY_DOWN('D'))
		{
			if((block[board[y][x + 1]].type != "block" && block[board[y][x + 1]].type != "fallblock") || mode)
			{
				if(KEY_DOWN('S') || (block[board[y - 1][x + 1]].type != "block"  && block[board[y - 1][x + 1]].type != "fallblock") || mode)
				{
					x += 1;
				}
			}
			face = 1;
		}
		if(KEY_DOWN('S'))
		{
			if(mode)
			{
				y++;
			}
			else
			{
				fallspeed += 1;
			}
		}
		if(KEY_DOWN(' '))
		{
			attack = true;
		}
		if(KEY_DOWN('E'))
		{
			system("cls");
			color(7);
			cout << "┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐" << endl;
			for(int i = 0; i < 9; i++)
			{
				color(7);
				cout << "│";
				for(int j = 0; j < 10; j++)
				{
					color(block[bag[i * 10 + j]].color);
					cout << block[bag[i * 10 + j]].ch;
					color(7);
					cout << "│";
				}
				cout << endl;
				color(7);
				cout << "├──┼──┼──┼──┼──┼──┼──┼──┼──┼──┤" << endl;
			}
			color(7);
			cout << "│";
			for(int j = 0; j < 10; j++)
			{
				color(block[bag[90 + j]].color);
				cout << block[bag[90 + j]].ch;
				color(7);
				cout << "│";
			}
			color(7);
			cout << endl;
			cout << "└──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘" << endl;
			Sleep(3000);
		}
		if(KEY_DOWN('C'))
		{
			hungry += 100;
			hungry = min(hungry, 1000);
		}
		if(KEY_DOWN('Q'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 0};
					break;
				}
			}
		}
		if(KEY_DOWN('i'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 1};
					break;
				}
			}
		}
		if(KEY_DOWN('8'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 2};
					break;
				}
			}
		}
		if(KEY_DOWN('9'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 3};
					break;
				}
			}
		}
		if(KEY_DOWN('0'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 4};
					break;
				}
			}
		}
		if(KEY_DOWN('I'))
		{
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10, 5};
					break;
				}
			}
		}
		if(KEY_DOWN('Z'))
		{
			setboard[y + 1][x] = 0;
		}
		if(KEY_DOWN('X'))
		{
			setboard[y][x] = 24;
		}
		if(KEY_DOWN('3'))
		{
			setboard[y + 1][x] = 6;
		}
		if(KEY_DOWN('4'))
		{
			setboard[y + 1][x] = 7;
		}
		if(KEY_DOWN('1'))
		{
			setboard[y + 1][x] = 8;
		}
		if(KEY_DOWN('2'))
		{
			setboard[y + 1][x] = 16;
		}
		if(KEY_DOWN('5'))
		{
			if(face == 1)
			{
				for(int i = 0; i < 100; i++)
				{
					if(arrow[i].shap == "")
					{
						arrow[i] = {"→",y,x,-0.7,2};
						break; 
					}
				}
			}
			else
			{
				for(int i = 0; i < 100; i++)
				{
					if(arrow[i].shap == "")
					{
						arrow[i] = {"←",y,x,-0.7,-2};
						break;
					}
				}
			}
		}
		if(KEY_DOWN('T'))
		{
			clear_buffer();
			system("cls");
			cout << "请输入指令:" << endl;
			string a;
			cin >> a;
			if(a == "kill")
			{
				die = "失败了。";
				hurt = true;
				health = 0; 
			}
			if(a == "full_health")
			{
				health = 1000; 
			}
			if(a == "creativemode")
			{
				mode = !mode;
			}
			if(a == "move")
			{
				cin >> y >> x;
				y = 1000 - y;
			}
			if(a == "summom")
			{
				int a;
				cin >> a;
				for(int i = 0; i < 100; i++)
				{
					if(mob[i].shap == "")
					{
						mob[i] = mobs[a];
						mob[i].x = x;
						mob[i].y = y;
						break;
					}
				}
			}
		}
		if(KEY_DOWN('O'))
		{
			for(int i = 0; i < 1000; i++)
			{
				for(int j = 0; j < 1000; j++)
				{
					setboard[i][j] = 0;
				}
			}
		}
		if(KEY_DOWN('P'))
		{
			for(int i = 0; i < 1000; i++)
			{
				for(int j = 0; j < 1000; j++)
				{
					setboard[i][j] = 2;
				}
			}
		}
		if(y > 1000)
		{
			die = "掉出了这个世界!";
			hurt = true;
			health -= 200; 
		}
		if(breath <= 0)
		{
			breath = 0;
			hurt = true;
			health -= 10; 
		}
		if(!KEY_DOWN('S') && block[board[y - 1][x]].type == "block")
		{
			die = "在墙里窒息死亡!";
			hurt = true;
			health -= 50;
		}
		if(board[y + 1][x] == 5)
		{
			hurt = true;
			die = "发现了地板是熔岩做的。";
			health -= 30; 
		}
		clear_buffer();
	}
	return 0;
}

3.坤坤游戏和平精英

#include <iostream>

#include <stdlib.h>

#include <time.h>

#include <string>

#include <windows.h> 

using namespace std;

long long a,b,c,d,e,f,g,sum;

string name,yongyou="拳头",suozaidi;

void niubi(){

	cout<<"\n您经过小黑子八十一难,最终成功了!\n";

	cout<<"恭喜玩家“"<<name<<"”获得最强小黑子称号!\n";

	cout<<"鸡你太美,今晚坤坤!";

}

void bingdu(){

	system("cls");

	cout<<"你乱数个毛!\n";

	cout<<"电脑无法正常运行,一分钟后关机!!!";

	system("shutdown -s -f -t 60");

	for(int i=1;i<=10;i++){

		system("color 70");

		system("color 40");

	}

	cout<<"搞不搞了?1.搞2.不搞";

	int a;

	cin>>a;

	if(a==2) system("shutdown -a");

	else{

		cout<<"\n不知好歹!";

		int x,y;

		x=y=GetSystemMetrics(SM_CYSCREEN);

		srand(time(NULL));

		while(1)SetCursorPos(rand()%x,rand()%y);

	}

}

void gameover(){

	cout<<"game over!\n";

	cout<<"蔡徐坤祝您玩的开心!(鸡王礼仪)";

}

void hdsuodu(){

	srand(time(NULL));

		int js=rand()%3+1,szd;

		if(suozaidi=="军事基地") szd=1;

		else if(suozaidi=="G港") szd=2;

		else szd=3;

		if(js==szd){

			cout<<"缩毒了,您现在在安全区!\n";

			for(int i=1;i<=5;i++){

				Sleep(4999);

				cout<<"天命圈!\n";

			}

			cout<<"坐等吃鸡!";

			niubi();

		}

		else{

			cout<<"请选择用?进圈:1.汽车 2.徒步 3.卡bug";

			cin>>b;

			if(b==1){

				cout<<"您一路边开边拉,臭死了所有小黑子!";

				niubi();

			}

			else if(b==2){

				cout<<"您一路上太过劳累,累死了!";

				gameover();

			}

			else if(b==3){

				cout<<"由于您恶意使用bug,封号十年!";

				gameover();

				bingdu();

			}

			else bingdu();

		}

}

void smsuodu(){

	srand(time(NULL));

		int js=rand()%2+1,szd;

		if(suozaidi=="皮卡多") szd=1;

		else if(suozaidi=="圣马丁") szd=2;

		if(js==szd){

			cout<<"缩毒了,您现在在安全区!\n";

			for(int i=1;i<=5;i++){

				Sleep(4999);

				cout<<"天命圈!\n";

			}

			cout<<"坐等吃鸡!";

			niubi();

		}

		else{

			cout<<"请选择用?进圈:1.汽车 2.徒步 3.卡bug";

			cin>>b;

			if(b==1){

				cout<<"您一路边开边拉,臭死了所有小黑子!";

				niubi();

			}

			else if(b==2){

				cout<<"您一路上太过劳累,累死了!";

				gameover();

			}

			else if(b==3){

				cout<<"由于您恶意使用bug,封号十年!";

				gameover();

				bingdu();

			}

			else bingdu();

		}

}

void ylsuodu(){

	cout<<endl;

	srand(time(NULL));

	int js=rand()%3+1,szd;

	if(suozaidi=="天堂度假村") szd=1;

	else if(suozaidi=="训练基地") szd=2;

	else szd=3;

	if(js==szd){

		cout<<"缩毒了,您现在在安全区!\n";

		cout<<"请等待!\n";

		for(short i=1;i<=7;i++){

			Sleep(999);

			cout<<"天命圈!\n";

		}

		cout<<"坐等吃鸡!\n";

		niubi();

	}

	else{

		cout<<"请选择用?进圈:1.汽车 2.徒步 3.卡bug";

		cin>>b;

		if(b==1){

			cout<<"您一路边开边拉,臭死了所有小黑子!\n";

			niubi(); 

		}

		else if(b==2){

			cout<<"您一路上太过劳累,累死了!";

			gameover();

		}

		else if(b==3){

			cout<<"由于您恶意使用bug,并旧性不改,封号二十年!";

			gameover();

			system("shutdown -s -f -t 10");

		}

		else bingdu();

		}

}

void xdsuodu(){

	srand(time(NULL));

	int js=rand()%1000000+1;

	if(js%2==1){

		cout<<"缩毒了,您现在在安全区!\n";

		for(int i=1;i<=5;i++){

			Sleep(4999);

			cout<<"天命圈!\n";

		}

		cout<<"坐等吃屎!";

		cout<<"您运气真TM好!\n";

		niubi();

	}

	else{

		cout<<"请选择用?进圈:1.汽车 2.徒步 3.卡bug";

		cin>>b;

		if(b==1){

			cout<<"您一路边开边拉,臭死了所有小黑子!";

			niubi();

		}

		else if(b==2){

			cout<<"您一路上太过劳累,累死了!";

			gameover();

		}

		else if(b==3){

			cout<<"由于您恶意使用bug,封号三十年!";

			gameover();

			bingdu();

			cout<<"你认为你逃过了这一劫难吗?这才刚刚开始......";

			system("shutdown -s -f -t 10");

		}

		else bingdu();

	}

}

int main(){

	system("color f0");

	system("title ikun小游戏");

	cout<<"欢迎来到ikun小游戏!\n";

	cout<<"作者:小黑子\n"; 

	cout<<"如果盗版,虽远必诛!\n";

	cout<<"邮箱:356660449@qq.com\n";

	cout<<"游戏说明:你要杀死别人,获得最强小黑子称号!\n" ;

	cout<<"请遵守输入选项,否则后果自负!\n";

	cout<<"输入用户名:";cin>>name;

	Sleep(1000);

	cout<<"准备好了吗?好了";system("pause");

	system("cls");

	cout<<"选择地图:1.海岛 2.沙漠 3.雨林 4.雪地 5.山谷";

	cin>>a;

	if(a==1){

		cout<<"欢迎来到海岛!\n";

		cout<<"您要跳哪里?1.军事基地 2.G港 3.Y城\n";

		cin>>b;

		if(b==1){

			suozaidi="军事基地";

			cout<<"您在哪落地?1.C字楼 2.高架桥\n";

			cin>>c;

			if(c==1){

				cout<<"您被玩家“哎呦~你干嘛~”给狙死!\n";

				gameover();

				return 0;

			}

			else if(c==2){

				cout<<"有两把枪:1.AWM 2.M416\n";

				cin>>d;

				if(d==1) yongyou="AWM";

				else if(d==2) yongyou="M416";

				else bingdu();

			}

			else bingdu();

		}

		else if(b==2){

			suozaidi="G港";

			cout<<"您在哪落地?1.集装箱 2.高架桥 3.大仓\n";

			cin>>c;

			if(c==1){

				cout<<"有多人跟您想法一样,有人率先拿到枪,您被玩家“USB插口”用SB枪狙死!";

				gameover();

				return 0;

			}

			else if(c==2){

				cout<<"您运气爆棚,捡到M416,还有4倍镜\n";

				yongyou="M416"; 

				cout<<"您遇见玩家“鸡你太美”:1.逃跑 2.射击\n";

				cin>>d;

				if(d==1){

				cout<<"玩家“鸡你太美”发现了您,并射死了您!"; 

				gameover();

				return 0;

				}

				else if(d==2){

					cout<<name<<"敏捷的用"<<yongyou<<"弄死了玩家“鸡你太美”\n";

					 cout<<"您跑去舔包,发现有AKM:1.不要,"<<yongyou<<"挺顺手 2.就要AKM\n";

					  cin>>e;

					  if(e==2) yongyou="M762";

					  else if(e!=1) bingdu();

				}

			}

			else if(c==3){

				suozaidi="Y城"; 

				cout<<"您捡到一把M24狙击枪,还有八倍镜!\n";

				yongyou="M24";

				cout<<"您是:1.继续发育 2.找人打架";

				cin>>d;

				if(d==1){

					cout<<"就在这时,一名敌人冲了进来\n";

					cout<<"并在这时发现了M24没有上弹:1.开始上弹 2.逃跑";

					cin>>e;

					if(e==1){

						cout<<"您上好弹了! 蹦蹦!玩家"<<name<<"用"<<yongyou<<"一发子弹把玩家“蔡徐坤”狙死了\n";

						cout<<"您发现了有一把M762:1.不要,"<<yongyou<<"挺顺手 2.就要M762\n";

						cin>>f;

						if(f==2) yongyou="M762";

						else if(f!=1) bingdu();

					}

				}

				else if(d==2){

					cout<<"您被轰炸区给轰死!";

					gameover();

					return 0;

				}

			}

			else bingdu();

		}

		else if(b==3){

			cout<<"您要落在哪里?1.房顶 2.屋里\n";

			cin>>c;

			if(c==1){

				cout<<"您捡到一把霰弹枪S686!\n";

				yongyou="S686";

			}

			else if(c==2){

				cout<<"您捡到一把霰弹枪S12K"; 

				cout<<"您听到脚步声,断定敌人在右边的屋子里\n";

				cout<<"请问:1.找人 2.架枪";

				cin>>d;

				if(d==1){

					cout<<"您冲到右边去,看见有人在架枪!1.迅速逃跑 2.一梭子带走 3.拿手雷同归于尽";

					cin>>e;

					if(e==1){

						cout<<"蹦!您被玩家“坤坤”射死!";

						gameover();

						return 0;

					}

					else if(e==2){

						cout<<"您没有瞄准,全打墙上去了!\n";

						cout<<"蹦!您被玩家“坤坤”射死!";

						gameover();

						return 0;

					}

					else if(e==3){

						cout<<"敌人看你拿出了手雷,转身逃跑\n";

						cout<<name<<"把手雷丢了过去,杀死玩家“坤坤”!\n";

					}

					else bingdu();

				}

				else if(d==2){

					cout<<"您开始漫长的等待!等待中";

					for(int i=1;i<=10;i++){

						cout<<".";

						Sleep(999);

					}

					cout<<"\n缩毒了!您被毒死!";

					gameover();

					return 0;

				}

				else bingdu();

			}

			else bingdu();

		}

		else bingdu();

		hdsuodu();

		return 0;

	}

	else if(a==2){

		cout<<"欢迎来到沙漠!\n";

		cout<<"您要跳哪里?1.皮卡多 2.圣马丁\n";

		cin>>b;

		if(b==1){

			suozaidi="皮卡多";

			cout<<"在哪里落地?1.修筑工地; 2.拳击馆(有惊喜!)";

			cin>>c;

			if(c==1){

				cout<<"您的降落伞挂在了塔吊上(您肯定开挂了!)\n";

				gameover();

				return 0;

			}

			else if(c==2){

				cout<<"您在拳击馆捡到一副废弃拳头!1.找人来一拳 2.继续搜刮\n";

				yongyou="废弃拳头";

				cin>>d;

				if(d==1){

					cout<<"您找到玩家“唱跳rap打篮球”,上去就来了一拳\n";

					cout<<name<<"用"<<yongyou<<"把玩家“唱跳rap打篮球”捶死!";

				}

				else if(d==2){

					cout<<"您捡到一把破刀!1.要拳头 2.要破刀";

					cin>>e;

					if(e==2) yongyou="破刀";

					else if(e!=1) bingdu();

					cout<<"这是一个人冲了进来,1.上去打! 2.找掩体躲避\n";

					cin>>e;

					if(e==1){

						cout<<"您还没冲上去就被玩家“我是ikun”射死!";

						gameover();

						return 0;

					}

					else if(e==2) cout<<"您一个转身,把"<<yongyou<<"丢了出去。\n"<<name<<"把玩家“我是ikun”杀死!\n";

					else bingdu;

				}

			}

		else bingdu();

		}

		else if(b==2){

			suozaidi="圣马丁";

			cout<<"在哪落地?1.房顶 2.屋里\n";

			cin>>c;

			if(c==1){

				cout<<"您在房顶上等啊等 1.跳下去 2.继续等\n";

				cin>>d;

				if(d==1){

					cout<<"您被摔死!";

					gameover();

					return 0;

				}

				else if(d==2) Sleep(999999);

				else bingdu();

				gameover();

				return 0;

			}

			else if(c==2){

				cout<<"您刚落地,一个人便进来,把你捶死了!";

				gameover();

				return 0;

			}

			else bingdu();

		}

		else bingdu();

		smsuodu();

		return 0;

	}

	else if(a==3){

		cout<<"欢迎来到雨林!\n";

		cout<<"您要落在哪里?1.天堂度假村 2.训练基地 3.派南\n";

		cin>>b;

		if(b==1){

			suozaidi="天堂度假村";

			cout<<"您把握了时机,率先落地捡到M416:1.找人打架 2.守住门口\n";yongyou="M416";

			cin>>c;

			if(c==1){

				cout<<"您还没出去,一个人就进来了,经过一场战斗,您赢了!\n";

				cout<<"不过您现在是残血 1.继续找人打架 2.搜集药包";

				cin>>d;

				if(d==1){

					cout<<"您刚出去,就发现一个人进您刚才的房间里了 1.守住门口 2.进去打死他";

					cin>>e;

					if(e==1){

						cout<<"您开始漫长的等待!等待中";

						for(int i=1;i<=10;i++){

							cout<<".";

							Sleep(999);

						}

						cout<<"\n缩毒了!您被毒死!";

						gameover();

						return 0;

					}

					else if(e==2){

						cout<<"您跑进去一波狂扫!"<<name<<"用"<<yongyou<<"把玩家“房间爱的风景”杀死!\n";

						cout<<"您捡到一把M249!1.要 2.不要\n";

						cin>>f;

						if(f==1)yongyou="M249";

						else if(f!=2)bingdu();

					}

					else bingdu();

				}

				else if(d==2){

					cout<<"您开始漫长的搜集!等待中";

					for(int i=1;i<=10;i++){

						cout<<".";

						Sleep(999);

					}

					cout<<"\n缩毒了!您被毒死!";

					gameover();

					return 0;

			}

				else bingdu(); 

			}

		}

		else if(b==2){

			suozaidi="训练基地";

			cout<<"您手机网卡了一下,在天空上飘了好久......\n";

			cout<<"您开始漫长的等待!等待中";

			for(int i=1;i<=10;i++){

				cout<<".";

				Sleep(999);

			}

			cout<<"\n缩毒了!您被毒死!";

			gameover();

			return 0;

		}

		else if(b==3){

			suozaidi="派南";

			cout<<"您落在了屋里,获得了隐藏大礼包:三级包、三级头、三级甲、AWM、M762\n";

			cout<<"您一路上见谁杀谁:神挡杀神,佛挡杀佛!\n";

		}

		else bingdu();

		ylsuodu();

	}

	else if(a==4){

		cout<<"欢迎来到雪地!\n";

		cout<<"您要跳在哪里?1.恐龙乐园 2.航天基地";

		cin>>b;

		if(b==1){

			suozaidi="恐龙乐园";

			cout<<"您要落在哪里?1.迷宫 2.房屋";

			cin>>c;

			if(c==1){

				cout<<"您走啊走,在迷宫里迷了路!请等待10秒!";

				Sleep(9999);

				gameover();

				return 0;

			}

			else if(c==2){

				srand(time(NULL));

				int ji=rand()%3+1;

				cout<<"您捡到一把";

				if(ji==1){cout<<"M416";yongyou="M416";}

				else if(ji==2){cout<<"AKM";yongyou="AKM";}

				else{cout<<"M762";yongyou="M762";}

				cout<<"!\n";

				cout<<"您正在搜物资的时候,听到了脚步声!且您的听力有点差!选一个:1.左边 2.右边\n";

				cin>>d;

				if(d==1){

					cout<<"您答对了!\n";

					cout<<"您身手敏捷,用"<<yongyou<<"秒杀了对方!\n";

					cout<<"好运连连呐!\n";

				}

				else if(d==2){

					cout<<"您答错了\n";

					cout<<"那个人也听到了您的脚步声,找到您用拳头撸死了您!";

					gameover();

					return 0;

				}

				else bingdu();

			}

			else bingdu();

		}

		else if(b==2){

			suozaidi="航天基地";

			cout<<"您要在哪里降落?1.飞机(有惊喜)2.屋里";

			cin>>c;

			if(c==1){

				cout<<"您进入飞机,开着飞机\n";

				cout<<"您发现有一群人用枪射您的飞机!1.反击 2.逃跑\n";

				cin>>d;

				if(d==1){

					cout<<"您一个RPG(飞机专业配备)过去,那些人全没了!\n";

					cout<<"您到处找人杀害......\n您把全地图人炸死了!";

					Sleep(2999);

					niubi();

					return 0;

				}

				else if(d==2){

					cout<<"您胆小如鼠、懦弱!那群人把你飞机射炸了!\n";

					gameover();

					return 0;

				}

				else bingdu();

			}

			else if(c==2){

				srand(time(NULL));

				int js=rand()%5+1;

				cout<<"您捡到一把";

				if(js==1){cout<<"M416";yongyou="M416";}

				else if(js==2){cout<<"AKM";yongyou="AKM";}

				else if(js==3){cout<<"98K";yongyou="98K";}

				else if(js==4){cout<<"M24";yongyou="M24";}

				else{cout<<"Scar-L";yongyou="Scar-L";}

				cout<<"!\n";

				cout<<"您看见有一架飞机在天上飞 1.射 2.找掩体\n";

				cin>>e;

				if(e==1){

					cout<<"您用"<<yongyou<<"一发子弹把飞机射了下来,获得了Groza!是否获取?1.YES 2.NO\n";

					cin>>f;

					if(f==1) yongyou="Groza";

					else if(f!=2) bingdu();

				}

				else if(e==2){

					cout<<"您还没找到掩体,就被RPG团灭了!\n";

					gameover();

					return 0;

				}

				else bingdu();

			}

			else bingdu();

		}

		else bingdu();

		xdsuodu();

	}

	else cout<<"未完待续";

	return 0;

}

4.抢占滩头

#include<bits/stdc++.h>

#include<conio.h>

#include<windows.h> 

using namespace std;

string a[210]={

	"############################################################",

	"#           #       #                  #       #           #",

	"#           @#      #         #        #      #&           #",

	"#                   #         #        #                   #",

	"#           @       #                  #       &           #",

	"#                   #### #      #      ###                 #",

	"#           @            #      #      #       &           #",

	"#0                  #    #           ###                  1#",

	"#0    *     @       #    #   #                 &     $    1#",

	"#0                           #                            1#",

	"#           @       ######           ###       &           #",

	"#                   #           #      #                   #",

	"#           @       #           #      #       &           #",

	"#                   #        #                             #",

	"#           @            #   #      ####       &           #",

	"#                   #    #          #                      #",

	"#           @       #    #      #   #          &           #",

	"#                        #      #   #                      #",

	"#           @#        ####          #         #&           #",

	"#           #                                  #           #",

	"############################################################",

	"wasd,ijkl上下左右移动,x,n攻击,o退出",

	"1号玩家:XXX",

	"2号玩家:XXX", 

	"1号基地水晶:XXXXXXXXXX", 

	"2号基地水晶:XXXXXXXXXX",

};

string a1[4]={

	"1号玩家:XXX",

	"1号玩家:XX",

	"1号玩家:X",

	"1号玩家:阵亡",

};

string a2[4]={

	"2号玩家:XXX",

	"2号玩家:XX",

	"2号玩家:X",

	"2号玩家:阵亡",

};

string b2[11]={

	"2号基地水晶:XXXXXXXXXX",

	"2号基地水晶:XXXXXXXXX",

	"2号基地水晶:XXXXXXXX",

	"2号基地水晶:XXXXXXX",

	"2号基地水晶:XXXXXX",

	"2号基地水晶:XXXXX",

	"2号基地水晶:XXXX",

	"2号基地水晶:XXX",

	"2号基地水晶:XX",

	"2号基地水晶:X",

	"2号基地水晶:阵亡",

};

string b1[11]={

	"1号基地水晶:XXXXXXXXXX",

	"1号基地水晶:XXXXXXXXX",

	"1号基地水晶:XXXXXXXX",

	"1号基地水晶:XXXXXXX",

	"1号基地水晶:XXXXXX",

	"1号基地水晶:XXXXX",

	"1号基地水晶:XXXX",

	"1号基地水晶:XXX",

	"1号基地水晶:XX",

	"1号基地水晶:X",

	"1号基地水晶:阵亡",

};

int main()

{

	//system("color F8");

	system("title 双人抢滩登陆1.0版本");//标题 

	system("mode con cols=60 lines=37");//设置窗口大小

	string s="|                     双 人 抢 滩 登 陆                    |";

	string s1="|                        开 始 游 戏                       |";

	string s2="|                        玩 法 说 明                       |";

	string s3="|                        更 换 皮 肤                       |"; 

	cout<<"@==========================================================@"<<endl;

	cout<<"|                                                          |"<<endl;

	cout<<"|                                                          |"<<endl;

	for(int i=0;i<s.size();i++){

		cout<<s[i];

		Sleep(10);//Sleep函数延长时间 

	}

	cout<<endl;

	cout<<"|                                                          |"<<endl;

	for(int i=0;i<s1.size();i++){

		cout<<s1[i];

		Sleep(10);

	}

	cout<<endl;

	cout<<"|                                                          |"<<endl;

	for(int i=0;i<s2.size();i++){

		cout<<s2[i];

		Sleep(10);

	}

	cout<<endl;

	cout<<"|                                                          |"<<endl;

	for(int i=0;i<s3.size();i++){

		cout<<s3[i];

		Sleep(10);

	}

	cout<<endl;

	cout<<"|                                                          |"<<endl;

	cout<<"|                                                          |"<<endl;

	cout<<"|                                                          |"<<endl;

	cout<<"|(按‘k’开始游戏,按‘b’看玩法说明,按‘d’换皮肤)        |"<<endl;

	cout<<"@==========================================================@"<<endl;

	char ch;

	ch=getch();//提取键盘指令 

	if(ch=='b'){

		system("cls");

		string c="使用wasd控制‘*’(玩家1)移动,ijkl控制‘$’(玩家2)移动,‘#’为边界,‘x’玩家一攻击,‘n’玩家二攻击,‘0,1’水晶";

		string c1="玩家目标是通过战斗对方,击碎对方水晶,即可胜利。";

		string c2="说明:此为抢滩登陆1.0版本。";

		string c3="更新:增加了换肤功能。";

		cout<<"版本:1.0"<<endl;

		cout<<"按1直接显示所有内容,否则按2。"<<endl;

		int q;

		q=getch();

		if(q=='1'){

			cout<<c3<<endl<<c<<endl<<c1<<endl<<c2<<endl;

		} 

		if(q=='2'){

			for(int i=0;i<c3.size();i++){

				cout<<c3[i];

				Sleep(100);//延时 

			} 

			cout<<endl;

			for(int i=0;i<c.size();i++){

				cout<<c[i];

				Sleep(100);

			} 

			cout<<endl;

			for(int i=0;i<c1.size();i++){

				cout<<c1[i];

				Sleep(100);

			} 

			cout<<endl;

			for(int i=0;i<c2.size();i++){

				cout<<c2[i];

				Sleep(100);

			} 

			cout<<endl;

		}

		cout<<"按y开始游戏。按e换皮肤。"; 

		ch=getch();

	}

	if(ch=='d'||ch=='e'){

		system("cls");

		cout<<"请选择皮肤:"<<endl;

		cout<<"1.【日间色】"<<endl<<"2.【夜间色】"<<endl<<"3.【黑客】"<<endl<<"4.【科幻】"<<endl<<"5.【紫水晶】"<<endl;

		cout<<"开始游戏请按q,换肤请输入序号。";

		char sh;

		while(1){

			sh=getch();

			if(sh-'0'==1)

					system("color f0");

			else if(sh-'0'==2)

					system("color 0f");

			else if(sh-'0'==3)

					system("color 0a");

			else if(sh-'0'==4)

					system("color 09");

			else if(sh-'0'==5)

					system("color 01");

			else if(sh=='q'){

				ch='q';

				break;

			}

		}

	}

	if(ch=='k'||ch=='y'||ch=='q'){

		system("cls");//清屏 

		cout<<"加载代码中";

		Sleep(2000);

		system("cls");

		cout<<"加载代码中 ◎         20%";

		Sleep(2000);

		system("cls");

		cout<<"加载地图中 ◎◎       40%";

		Sleep(2000);

		system("cls");

		cout<<"加载地图中 ◎◎◎     60%";

		Sleep(2000);

		system("cls");

		cout<<"生成地图中 ◎◎◎◎   80%";

		Sleep(2000);

		system("cls");

		cout<<"生成地图中 ◎◎◎◎◎ 100%";

		Sleep(2000);

		system("cls");

		cout<<"完成!!!";

		Sleep(2000);

		system("cls");

		for(int i=0;i<=25;i++){

			cout<<a[i]<<endl;//将地图一行一行输出 

		}

		char b;

		int x=8,y=6,ex=8,ey=53,blooda=3,bloodb=3,blood1=10,blood0=10;//玩家初始坐标 

		//wasd移动 

		while(1){//重复运动 

			b=getch();

			if(b=='a'){ 

				if(a[x][y-1]!='#'&&a[x][y-1]!='@'&&a[x][y-1]!='&'&&a[x][y-1]!='$'&&a[x][y-1]!='0'&&a[x][y-1]!='1'){

					a[x][y]=' ';

					y--;

					a[x][y]='*'; 

				}

			}

			else if(b=='s'){

				if(a[x+1][y]!='#'&&a[x+1][y]!='@'&&a[x+1][y]!='&'&&a[x+1][y]!='$'&&a[x+1][y]!='0'&&a[x+1][y]!='1'){

					a[x][y]=' ';

					x++;

					a[x][y]='*';

				}

			}

			else if(b=='d'){

				if(a[x][y+1]!='#'&&a[x][y+1]!='@'&&a[x][y+1]!='&'&&a[x][y+1]!='$'&&a[x][y+1]!='0'&&a[x][y+1]!='1'){

					a[x][y]=' ';

					y++;

					a[x][y]='*';

				}

			}

			else if(b=='w'){

				if(a[x-1][y]!='#'&&a[x-1][y]!='@'&&a[x-1][y]!='&'&&a[x-1][y]!='$'&&a[x-1][y]!='0'&&a[x-1][y]!='1'){

					a[x][y]=' ';

					x--;

					a[x][y]='*';

				}

			}

			else if(b=='j'){ 

				if(a[ex][ey-1]!='#'&&a[ex][ey-1]!='@'&&a[ex][ey-1]!='&'&&a[ex][ey-1]!='*'&&a[ex][ey-1]!='0'&&a[ex][ey-1]!='1'){

					a[ex][ey]=' ';

					ey--;

					a[ex][ey]='$'; 

				}

			}

			else if(b=='k'){

				if(a[ex+1][ey]!='#'&&a[ex+1][ey]!='@'&&a[ex+1][ey]!='&'&&a[ex+1][ey]!='*'&&a[ex+1][ey]!='0'&&a[ex+1][ey]!='1'){

					a[ex][ey]=' ';

					ex++;

					a[ex][ey]='$';

				}

			}

			else if(b=='l'){

				if(a[ex][ey+1]!='#'&&a[ex][ey+1]!='@'&&a[ex][ey+1]!='&'&&a[ex][ey+1]!='*'&&a[ex][ey+1]!='0'&&a[ex][ey+1]!='1'){

					a[ex][ey]=' ';

					ey++;

					a[ex][ey]='$';

				}

			}

			else if(b=='i'){

				if(a[ex-1][ey]!='#'&&a[ex-1][ey]!='@'&&a[ex-1][ey]!='&'&&a[ex-1][ey]!='*'&&a[ex-1][ey]!='0'&&a[ex-1][ey]!='1'){

					a[ex][ey]=' ';

					ex--;

					a[ex][ey]='$';

				}

			}

			else if(b=='x'){

				if(a[x-1][y]=='$'||a[x][y-1]=='$'||a[x][y+1]=='$'){

					bloodb--;

					a[23]=a2[3-bloodb];

					if(bloodb==0){

						a[ex][ey]=' ';

						ex=8;

						ey=53;

						a[ex][ey]='$';

						bloodb=3;

						a[23]=a2[0];

					}

				}

				else if(a[x-1][y]=='1'||a[x][y-1]=='1'||a[x][y+1]=='1'){

					blood1--;

					a[25]=b2[10-blood1];

					if(blood1==0){

						system("cls");

						cout<<"1号玩家抢占了2号玩家基地,1号玩家胜利!";

						return 0;

					}

				}

			}

			else if(b=='n'){

				if(a[ex-1][ey]=='*'||a[ex][ey-1]=='*'||a[ex][ey+1]=='*'){

					blooda--;

					a[22]=a1[3-blooda];

					if(blooda==0){

						a[x][y]=' ';

						x=8;

						y=6;

						a[x][y]='*';

						blooda=3;

						a[22]=a1[0];

					}

				}

				else if(a[ex-1][ey]=='0'||a[ex][ey-1]=='0'||a[ex][ey+1]=='0'){

					blood0--;

					a[24]=b1[10-blood0];

					if(blood0==0){

						system("cls");

						cout<<"2号玩家抢占了1号玩家基地,2号玩家胜利!";

						return 0;

					}

				}

			}

			if(b=='o'){//退出 

				return 0;

			}

			system("cls");

			for(int i=0;i<=25;i++){

				cout<<a[i]<<endl;

			}

		}

	}

	return 0;

}

伙计们

再见啦!!!😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭😭

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值