lzth.net
当前位置:首页 >> 求,贪吃蛇 C语言代码 及其每一步的讲解 >>

求,贪吃蛇 C语言代码 及其每一步的讲解

/* 贪吃蛇程序 by champking */#define N 200#include <graphics.h>#include <stdlib.h>#include <dos.h>#define LEFT 0x4b00#define RIGHT 0x4d00#define DOWN 0x5000#define UP 0x4800#define ESC 0x011b int i,key; int score = 0;/*得分*/ int

我实现一个,请笑纳~ 值得注意的是,要将EGAVGA.BGI文件拷到和这个源程序同一个目录下才能正常显示.EGAVGA.BGI在C语言软件的安装目录下,你可以在该文件夹搜索找到!#include "stdio.h"#include "graphics.h"#include "stdlib.h

最低0.27元开通文库会员,查看完整内容> 原发布者:西瓜萝卜饭lala #include#include#include#include#include#include#include#defineN21charapple[2];chartail[2];char**snake=NULL;intscore=0;intlen=3;charmax=0;voidgotoxy(intx,inty)//输出坐标{

#define N 200#include #include #include #define LEFT 0x4b00#define RIGHT 0x4d00#define DOWN 0x5000#define UP 0x4800#define ESC 0x011bint i,key;int score=0;/*得分*/int gamespeed=50000;/*游戏速度自己调整*/struct Food{ int x;

#include <windows.h>#include <stdlib.h>#include <time.h>#include <stdio.h>#include <string.h>#include <conio.h>#define N 21 int apple[3],num; char score[3]; char tail[3]; void gotoxy(int x, int y) //输出坐标 { COORD pos; pos.X = x; pos.Y = y;

原发布者:西瓜萝卜饭lala#include#include#include#include#include#include#include#defineN21 charapple[2]; chartail[2]; char**snake=NULL; intscore=0; intlen=3; charmax=0; voidgotoxy(intx,inty)//输出坐标 { COORDpos; pos.X=x; pos.Y=y;

我只有turboc下的c语言代码,可惜你用不上.

#define N 200 #include <graphics.h> #include <stdlib.h> #include <dos.h> #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b int i,key; int score=0;/*得分*/ int gamespeed=50000;/*游

// ConsoleApplication1.cpp: 定义控制台应用程序的入口点.//#include "stdafx.h"#include #include #include #include #define frame_height 20 //define map size#define frame_width 40#define UP 'w' //define operate key#define DOWN 's'#

#include <stdio.h> #include <graphics.h> #include <stdlib.h> #include <dos.h> /*引用的库函数*/ #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b/*宏定义键名*/ #define N 200 int i,key;

网站首页 | 网站地图
All rights reserved Powered by www.lzth.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com