C语言项目--飞机
发布时间
阅读量:
阅读量
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
#define N 35
#pragma warning(disable: 4996)
int str[22][N] = { 0 }, plane = 9, width = 24, speed = 3, density = 30, score = 0, death = 0;
//全局变量:界面、我机初始位、界面宽度、敌机速度、敌机密度、得分、死亡
void show(int a[][N]);//打印函数
void movebul(int[][N]);//子弹移动函数
void moveplane(int[][N]);//敌机移动函数
int main()
{
int i = 0, j = 0;
str[21][plane] = 1;
str[0][5] = 3;
while (1)
{
if (kbhit())
switch (getch())//控制左右移动和子弹
{
case 'a':
全部评论 (0)
还没有任何评论哟~
