文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > c++贪吃蛇源码
侵权投诉

c++贪吃蛇源码

c++贪吃蛇源码

用c++实现的"贪吃蛇"游戏源码

2008-04-10 21:44

// greedsnake.cpp

#include <bios.h>

#include <conio.h>

#include <dos.h>

#include <graphics.h>

#include <stdlib.h>

#include <time.h>

#include "conf.h"

typedef struct node

{

int x,y;

struct node *next;

}Node;

typedef struct

{

Node *head,*tail;

int length;

}Snake;

typedef struct

{

int left,top,right,bottom;

}Frame;

typedef enum //

{

up,down,left,right

}Direction;

typedef enum

{

false,true

}bool;//*/

void InitGraphMode(); //

void CloseGraphMode();

void Foot(int,int);

void Head(int,int);

void CreateFrame(); //

void CreateSnake(); //

bool PlayGame(); //四个方向 初始化图形驱动 完成整个游戏框架的绘制 创建一条两个节点的蛇,蛇的每一节是队列中的一个节点游戏的主体函数,

第1页

你可能喜欢

  • c++代码
  • c++经典代码大全
  • 贪吃蛇报告
  • 俄罗斯方块代码
  • c++俄罗斯方块
  • MFC入门
  • c++编程题
  • 俄罗斯方块程序设计

热门文档

相关文档

  • C++贪吃蛇cpp源代码终极版

    C++贪吃蛇cpp源代码终极版_IT/计算机_专业资料。很好用的...#include <graphics.h> //EasyX_2011惊蛰版(绘图库) #include <stdio.h> #include <conio.h>...

  • C++贪吃蛇源代码

    C++贪吃蛇源代码_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 C++贪吃蛇源代码_IT/计算机_专业资料。#include "graphics.h" #include "stdio.h" ...

  • c++贪吃蛇源代码

    c++贪吃蛇源代码_工学_高等教育_教育专区。一个c++贪吃蛇的源代码,有排行榜,成绩显示,功能完善,课程设计必备哟!#include <iostream> #include <windows.h> #...

  • 贪吃蛇 C++源代码

    贪吃蛇 C++源代码_计算机软件及应用_IT/计算机_专业资料。贪吃蛇 C++源代码这是贪吃蛇游戏的双人对战版。 游戏双方分别控制蓝色和红色两条小蛇的前进,碰壁或咬到...

  • 贪吃蛇c++源代码

    [j]<<' '; cout<<endl; } } //蛇结点; class SnakeNode{ private: int x,y; SnakeNode *prior,*next; public: void add_head(int x,int y); int...

  • C++贪吃蛇cpp源代码

    C++贪吃蛇cpp源代码_IT/计算机_专业资料。c++贪吃蛇// tcs.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <...

  • 贪吃蛇C++代码

    贪吃蛇C++代码_计算机软件及应用_IT/计算机_专业资料。利用C++ 代码实现的贪吃蛇控制台应用程序,可玩性 很高#include <windows.h> #include <stdlib.h> #...

  • 贪食蛇C++版源码

    C语言贪吃蛇源码 暂无评价 2页 免费 贪吃蛇游戏C源程序 5页 1下载券 c... 用C++写的贪食蛇 没用图...

  • C++语言贪吃蛇游戏源代码

    C++语言贪吃蛇游戏源代码_计算机软件及应用_IT/计算机_专业资料。蛇年来临创作一个与蛇有关的经典游戏《贪吃蛇》,与同学们分享蛇年美好的时光。欢迎交流与探讨,...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email