本次增加:
First Blood 和 Double Kill
本次遗憾:
想在First Blood 和 Double Kill 的地方播个红眼特效的音乐,但如何操作却不知道,之前也搜过,都要报错,求哪位大佬教一下!
代码来也!
#include <iostream>
#include <Windows.h>
#include <conio.h>
#include <string.h>
#include <ctime>
using namespace std;
char n;
int x, y;
int a, b;
string ch_1, ch_2;
int main()
{
cout << "------------------------------------------------------华丽的开始线------------------------------------------------------";
cout << "作为一个萌新,也该坑坑人了……" << endl;
Sleep(2000);
cout << "好吧!system(\"start\")来一波!" << endl;
Sleep(2000);
cout << "似乎哪里出问题了。" << endl;
Sleep(5000);
system("start");
system("start");
system("start");
system("start");
system("start");
Sleep(1000);
cout << "呵呵,关完没有?\n1、关完了\n2、没有" << endl;
n = _getch();
cout << "呵呵,管你关完没有。再见!" << endl;
Sleep(1000);
system("rundll32.exe user32.dll,LockWorkStation");
Sleep(5000);
cout << "呵呵,我又回来了!MEIFAXIANSHUBIAODONGBULIAOMA?" << endl;
while (!_kbhit())
{
SetCursorPos(1, 1);
}
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
Sleep(2000);
cout << "呵呵,我怎么那么喜欢说“呵呵”呢?" << endl;
while (!_kbhit())
{
SetCursorPos(1, 1);
}
cout << "呵呵,来一个无聊的!" << endl;
for (int i = 0; i < 10; i++)
{
system("color A0");
Sleep(50);
system("color B0");
Sleep(50);
system("color C0");
Sleep(50);
system("color D0");
Sleep(50);
system("color E0");
Sleep(50);
system("color F0");
Sleep(50);
}
Sleep(2000);
cout << "没把你闪瞎吧!" << endl;
Sleep(2000);
cout << "-------------------------------------------------------小游戏环节-------------------------------------------------------";
srand(time(0));
for (int i = 1; i <= 3; i++)
{
x = rand() % 10 + 1;
y = rand() % 39 + 1;
if (i == 1)
{
ch_1 = "汩";
ch_2 = "汨";
}
if (i == 2)
{
ch_1 = "汆";
ch_2 = "氽";
}
if (i == 3)
{
ch_1 = "匚";
ch_2 = "匸";
}
cout << "找不同——" << i << endl;
cout << " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ";
for (int j = 1; j <= 10; j++)
{
if (j >= 1 && j <= 9)
{
cout << j << " ";
}
else
{
cout << j << " ";
}
for (int k = 1; k <= 39; k++)
{
if (j == x && k == y)
{
cout << ch_2 << " ";
}
else
{
cout << ch_1 << " ";
}
}
}
cout << "请依次输入行数、列数:"; cin >> a >> b;
if (a == x && b == y)
{
cout << "正确!" << endl;
}
else
{
cout << "错误!" << endl;
Sleep(2000);
system("cls");
i--;
}
if (i != 3)
{
cout << endl;
}
}
cout << "------------------------------------------------------华丽的分割线------------------------------------------------------";
cout << "旁白:你是一位“main”函数,代码已预加载<iostream>。" << endl;
Sleep(2000);
cout << "std:main,喏!cin、cout、endl……给你!" << endl;
Sleep(1000);
MessageBox(GetForegroundWindow(), L"是否接受?", L"std", 4);
Sleep(1000);
cout << "旁白:萌新并没加上\"using namespace std;\"。" << endl;
Sleep(2000);
cout << "旁白:这位萌新写上了一句cout,并编译了一下。" << endl;
Sleep(2000);
cout << "系统:\"cout\":未声明的标识符" << endl;
Sleep(2000);
cout << "旁白:萌新一塌糊涂。" << endl;
Sleep(2000);
cout << "旁白:于是,萌新到网上搜了个代码,把你删掉了。" << endl;
Sleep(2000);
cout << "------------------------------------------------------First Blood------------------------------------------------------";
Sleep(2000);
cout << "Windows.h:喏!Sleep、MessageBox……给你!" << endl;
Sleep(1000);
MessageBox(GetForegroundWindow(), L"是否接受?", L"Windows.h", 3);
Sleep(1000);
cout << "旁白:萌新并没加上\"#include <Windows.h>\"。" << endl;
Sleep(2000);
cout << "旁白:这位萌新写上了一句Sleep,并编译了一下。" << endl;
Sleep(2000);
cout << "系统:\"Sleep\":未声明的标识符" << endl;
Sleep(2000);
cout << "旁白:萌新一塌糊涂。" << endl;
Sleep(2000);
cout << "旁白:于是,萌新又到网上搜了个代码,把你删掉了。" << endl;
Sleep(2000);
cout << "------------------------------------------------------Double Kill------------------------------------------------------";
Sleep(2000);
cout << "------------------------------------------------------华丽的结束线------------------------------------------------------";
}
好了,不说太多,下次再见!
|