既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
printf("%c", 32);
printf("+\n");
}
void plane(int plane_x, int plane_y, int isfire)//生成飞机
{
int i = 0;
int j = 0;
for (i = 1; i < plane_y - 2; i++)
printf(“\n”);
if (isfire)//如果开火,显示竖线
{
for (j = 1; j < plane_x; j++)
putchar(32);
putchar(‘|’);
}
printf(“\n”);
for (j = 1; j < plane_x; j++)
putchar(32);
putchar(‘*’);
printf(“\n”);
for (j = 1; j < plane_x - 2; j++)
putchar(32);
printf(“*****\n”);
for (j = 1; j < plane_x - 1; j++)
putchar(32);
printf(“* *\n”);
}
void game()//游戏主程序
{
int i = 0;
int isfire = 0;
int score = 0;//接收分数
int plane_x = 10;//飞机横坐标
int plane_y = 10;//飞机纵坐标
int target_x = 3;//目标横坐标
int target_y = 3;//目标纵坐标
int x = 0;
int y = 0;
srand((unsigned int)time(NULL));
target_x = rand() % 100 + 2;
target_y = rand() % (plane_y - 5) + 1;
target(target_x, target_y);
plane(plane_x, plane_y - target_y + 1, isfire);
while (1)
{
system(“cls”);
target(target_x, target_y);
plane(plane_x, plane_y, isfire);
for (i = 0; i < 20 - plane_y; i++)
printf(“\n”);
for (i = 0; i < 99; i++)
putchar(32);
printf(“score: %d\n”, score);
isfire = 0;
char key = _getch();
switch (key)//判断按键信息
{
case ‘w’:
case ‘W’:
plane_y–; break;
case ‘s’:
case ‘S’:
plane_y++; break;
case ‘a’:
case ‘A’:
plane_x–; break;
case ‘d’:
case ‘D’:
plane_x++; break;
case ’ ':
isfire = 1;
}
if (isfire && plane_x == target_x)//如果击中目标,生成下一个目标
{
target_x = rand() % 100 + 2;
target_y = rand() % (plane_y - 5) + 1;
score++;
}
if (key == ‘E’ || key == ‘e’)break;//如果按下E或e,结束本次游戏
}
}
void menu()//打印菜单栏
{
printf(“********************************\n”);
printf(“******(**play.1 exit.0*********\n”);
printf(“********************************\n”);
}
void test()//判断是否开始游戏
{
int i = 1;
while (i)
{
menu();
printf(“请玩家输入>\n”);
scanf(“%d”, &i);//用来接受1或0,以判断是否开始游戏
if (i == 1)
{
game();
}
else if (i != 0)
{
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**