#include <bits/stdc++.h>
#include <windows.h>
#include <conio.h>
using namespace std;
int high, width;
int sum;
struct ballxy {
int x;
int y;
int vx;
int vy;
} ball;
struct ban {
int longg;
int left;
int right;
} b;
void gotoxy(int x, int y) { //回调光标
COORD pos;
pos.X = x;
pos.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void HideCursor() { //隐藏光标函数
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
}
void startup() {
HideCursor();
gotoxy(45, 14);
cout << "欢迎来到反弹球游戏!";
Sleep(1000);
system("cls");
for (int i = 3; i > 0; i --) {
system("cls");
gotoxy(55, 14);
cout << i;
Sleep(1000);
}
gotoxy(55, 14);
cout << "开始!";
Sleep(1000);
high = 27;
width &#
C++字符界面——反弹球
最新推荐文章于 2024-04-20 14:28:53 发布