• 大小: 0.02M
    文件类型: .cpp
    金币: 1
    下载: 0 次
    发布日期: 2021-01-29
  • 语言: C/C++
  • 标签: 游戏  飞机  打飞机  

资源简介

打飞机游戏

资源截图

代码片段和文件信息

#include  
#include  
#include  
#include  
#include  
using namespace std;  
  
/*=============== all the structures ===============*/  
  
typedef struct frame  
{  
    COORD position[2];  
    int flag;  
}frame;  
  
  
/*=============== all the functions ===============*/  
  
void SetPos(COORD a)// set cursor   
{  
    HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);  
    SetConsoleCursorPosition(out a);  
}  
  
void SetPos(int i int j)// set cursor  
{  
    COORD pos={i j};  
    SetPos(pos);  
}  
  
void HideCursor()  
{  
    CONSOLE_CURSOR_INFO cursor_info = {1 0};   
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE) &cursor_info);  
}  
  
//把第y行,[x1 x2) 之间的坐标填充为 ch  
void drawRow(in

评论

共有 条评论