为什么自定义函数gameinit和gamedraw调用不了呜呜呜
#include <graphics.h> //安装了easyx#include<stdio.h>
#define SNAKE_NUM 500//蛇的最大节数
struct Snake
{
int size;//节数
int dir;//方向
int speed;//速度
POINT coor[SNAKE_NUM];//坐标
}snake;
//数据的初始化
void GameInit()
{ //初始化窗口
initgraph(640, 480);
//初始化蛇
snake.size = 3;
snake.speed = 10;
snake.dir;
for (size_t i = 0; i < 3; i++)
{
snake.coor[i].x = 10;
snake.coor[i].y = 10;
}
}
void Gamedraw()
{
//设置背景颜色
setbkcolor(RGB(28, 115, 119));
cleardevice();
//绘制蛇
//setfillcolor(RED);
solidcircle(snake.coor[0].x, snake.coor[0].y, 5);
}
int main()
{
Gamedraw();
GameInit();//就是 这里!!!!!
while (1)
{
}
return 0;
}