这次game有一点乐趣了,hhhh
#ifndef SOMETHING_H
#define SOMETHING_H
#include<bits/stdc++.h>
#include<windows.h>
#include "conio.h"
void ycgb() {
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return ;
}
#endif
using namespace std;
int x;
string str;
void start() {
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" PLAY!"<<endl;
}
void showMenu() {
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" *************************"<<endl;
cout<<" **** 1、PLAY ************"<<endl;
cout<<" **** 0、退出 ************"<<endl;
cout<<" *************************"<<endl;
}
void cao_showMenu() {
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" Let's play!"<<endl;
}
void hh() {
system("cls");
cao_showMenu();
while(1) {
system("color 1");
system("color 2");
system("color 3");
system("color 4");
system("color 5");
system("color 6");
system("color 7");
system("color 8");
system("color 9");
system("color 10");
system("color 11");
system("color 12");
system("color 13");
system("color 14");
system("color 15");
system("color 16");
system("color 17");
system("color 18");
system("color 19");
system("color 20");
}
}
int main() {
ycgb();
start();
str=getch();
system("cls");
while(1) {
showMenu();
x=getch();
switch(x) {
case 1:
hh();
break;
case 0:
break;
default:
hh();
break;
}
if(x==0)
break;
}
return 0;
}