求贪食蛇的C++代码,不是TC的,注意

来源:百度知道 编辑:UC知道 时间:2024/05/20 14:36:29
有这些头文件的原代码不必发,肯定通不过

#include<stdio.h>
#include<graphics.h> //这是TC的图形库,其他编译环境没有这玩意
#include<bios.h>
#include<stdlib.h>
#include<conio.h>

我要的是能在VC和BC和DEV C++下能编译通过的,游戏可运行的话我会加分
我都说了不要TC的

#include "graphics.h"
#include "stdio.h"

#define MAX 200
#define MAXX 30
#define MAXY 30

#define UP 18432
#define DOWN 20480
#define LEFT 19200
#define RIGHT 19712
#define ESC 283
#define ENTER 7181
#define PAGEUP 18688
#define PAGEDOWN 20736
#define KEY_U 5749
#define KEY_K 9579
#define CTRL_P 6512
#define TRUE 1
#define FALSE 0
#define GAMEINIT 1
#define GAMESTART 2
#define GAMEHAPPY 3
#define GAMEOVER 4

struct SPlace
{
int x;
int y;
int st;
} place[MAX];
int speed;
int count;
int score;