快看代码:
不会玩评论里告诉我哈
可能有bug呵
#include<bits/stdc++.h>
#include<windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
char s[2000][2000],c;
int x = 1,y = 1,cnt,a = -1,b,l = 10,r = 30,much = 10,cnts;
bool flag;
void make()
{
srand((unsigned)time(0));
while(a == -1)
{
a = rand() % l + 1,b = rand() % r + 1;
if (s[a][b] != ' ')
a = -1;
}
s[a][b] = '$';
}
int main()
{
srand((unsigned)time(0));
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
cout << "Whether to turn on automatic brick refresh A.ture B.false(是否开启砖石自动刷新 A.是 B.不是):";
while(1)
{
if (KEY_DOWN('A'))
{
flag = t