U550995 MONSTER RUSH怪物围城

题目描述

> 作者的第一个**射击游戏**耶! # __INTRODUTION__ **survive in the mosnter's attack.shoot&kill them if you need.Will update this game randomly.** # __TRANSLATION翻译__ **在怪物的攻击中活下来!必要时也可以开枪反击。WASD移动,空格射击。_该游戏没有结束_。不定期更新。** --- # __CODE__ ``` #include #include //#include #include #include #include //#include #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) #define Long_Long_Max 9223372036854775807 #define Int_Max 2147483647 //#define SHAKE 5 using namespace std; extern const int BLACK=0, DARKBLUE=1,DBLUE=1, GREEN=2, BLUE=3, RED=4, PURPLE=5, DIRT=6,YELLOWGREY=6, LIGHTGREY=7,LGREY=7, GREY=8,DGREY=8,DARKGREY=8, SKYBLUE=9,SBLUE=9, LGREEN=10,LIGHTGREEN=10, CANYON=11, LRED=12,LIGHTRED=12,BRED=12,BRIGHTRED=12, LPURPLE=13,LIGHTPURPLE=13, LYELLOW=14,LIGHTYELLOW=14, WHITE=15 ; typedef BOOL (WINAPI *PROCSETCONSOLEFONT)(HANDLE, DWORD); PROCSETCONSOLEFONT SetConsoleFont; void ResizeFont(int a) { HMODULE hKernel32=GetModuleHandle("kernel32"); SetConsoleFont=(PROCSETCONSOLEFONT)GetProcAddress(hKernel32,"SetConsoleFont"); SetConsoleFont(GetStdHandle(STD_OUTPUT_HANDLE),a); } void Color(int text,int background) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),text+background*16); } void BColor(int background) { if(background==15)Color(0,background); else Color(15,background); } void BColor(string background) { int len=background.length(); for(int i=0;i96)background[i]-=32; } if(background=="BLACK")Color(15,0); if(background=="DARKBLUE"||background=="DBLUE")Color(15,1); if(background=="GREEN")Color(15,2); if(background=="BLUE")Color(15,3); if(background=="RED")Color(15,4); if(background=="PURPLE")Color(15,5); if(background=="DIRT"||background=="YELLOWGREY")Color(15,6); if(background=="LIGHTGREY"||background=="LGREY")Color(15,7); if(background=="GREY"||background=="DGREY"||background=="DARKGREY")Color(15,8); if(background=="SKYBLUE"||background=="SBLUE")Color(15,9); if(background=="LGREEN"||background=="LIGHTGREEN")Color(15,10); if(background=="CANYON")Color(15,11); if(background=="LRED"||background=="LIGHTRED"||background=="BRED"||background=="BRIGHTRED")Color(15,12); if(background=="LPURPLE"||background=="LIGHTPURPLE")Color(15,13); if(background=="LYELLOW"||background=="LIGHTYELLOW")Color(15,14); if(background=="WHITE")Color(0,15); } void cls() { BColor(BLACK); system("cls"); } struct CTRL { void SetPointerVisual(bool visual) { //1=show 0=hide HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cci; GetConsoleCursorInfo(hOut,&cci); cci.bVisible=visual; SetConsoleCursorInfo(hOut,&cci); } }; extern CTRL Ctrl; struct Bas { void Hi() { cout

输入格式

输出格式