#include <iostream>
#include <conio.h> // 包含getch()函数,用于无缓冲读取按键
#include <windows.h> // 包含Sleep()函数,控制动画帧率
using namespace std;
// 定义“小黑子”的初始字符画(可根据需要调整形状)
const string base_shape =
" _ \n"
" (o.o)\n"
" | |\n"
" / \ ";
// 定义“跳舞”动作的字符变化(模拟摇摆、跳跃)
string dance_moves[] = {
" _ \n"
" (o.o)\n"
" | |\n"
" / \ ", // 动作1:站立
" _ \n"
" (o.o)\n"
" | |\n"
" / \ ", // 动作2:左摆
" _ \n"
" (o.o)\n"
" | |\n"
" \ / ", // 动作3:右摆
" _ \n"
" (o.o)\n"
" | |\n"
" / \\n"
" / \ " // 动作4:跳跃
};
int main() {
// 隐藏光标,提升动画沉浸感
system("echo off"); // Windows终端隐藏光标
cout << "\033[?25l"; // ANSI转义序列隐藏光标(跨平台兼容)
}