啊哈磊_编程从这里起步
标题:
求告知为什么运行画面一片空白什么都没有。。。没有出现字符A
[打印本页]
作者:
花鸟风月
时间:
2020-10-5 22:27
标题:
求告知为什么运行画面一片空白什么都没有。。。没有出现字符A
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
int main()
{
int plane_x,plane_y;
int enemy_x,enemy_y;
int zidan_x,zidan_y;
int bottom,right;
int x,y,a,b;
char zifu;
void startup()//初始化
{
plane_x=10;
plane_y=10;
right=80;
bottom=40;
}
while(666)//游戏循环
{
void show()//显示画面
{
system("cls");
for(b=0;b<=bottom;b++)
{
for(a=0;a<=right;a++)
{
if((a==plane_x)&&(b==plane_y))
printf("A");
else
printf(" ");
}
printf("");
Sleep(100);
system("pause");
}
}
void updatewithoutinput()
{
}
void updatewithinput()
{
zifu=getch();
if(zifu=='w'&&plane_y>0)
plane_y--;
}
}
system("pause");
return 0;
}
复制代码
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2