-
C语言实现贪吃蛇
//: Snake.c
/* * * * * * * * * * * * * * * * * * * * * * *
// Project: RedSnake(贪吃蛇)
// Author: Problue
// Version: 1.0
// Date: 19:55 2012-10-29
* * * * * * * * * * * * * * * * * * * * * * */
#include
#include
#include
#include "pcc32.h"
// 定义地图的尺寸及坐标
#define MAP_WIDTH 32 // 地图宽度
#define MAP_HEIGHT 32 // 地图高度
#define OFFSET_X 1 // 地图左右的边距
#define OFFSET_Y 1 // 地图上下的边距
#define TOTAL_WIDTH (MAP_WIDTH + OFFSET_X * 2) // 窗口宽度
#define TOTAL_HEIGHT (MAP_HEIGHT + OFFSET_Y * 2) // 窗口高度
#define GotoMap(x, y) gotoTextPos((x) * 2, (y))
// 定义地图方格的状态,分别为: 空格、蛇头、蛇身、蛇尾、食物
#define BS_SPACE 0
#define BS_SHEAD 1
#define BS_SBODY 2
#define BS_STAIL 3
#define BS_FOOD 4
// 蛇默认长度
#define SNAKE_MIN_LEN 5
// 定义蛇运动方向: 上、下、左、右
#define DIR_UP 1
#define DIR_DOWN 2
#define DIR_LEFT 3
- 2022-05-15 19:59:34下载
- 积分:1
-
该问题主要用于解决八皇后问题。会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8*8个方格),使它们谁也不...
该问题主要用于解决八皇后问题。会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8*8个方格),使它们谁也不能被吃掉!这就是著名的八皇后问题。-The problem is mainly used to solve the issue of the eight Queen
- 2022-01-26 06:08:28下载
- 积分:1
-
c++习题与解答。pdg格式。中国IT实验室学习
c++习题与解答。pdg格式。中国IT实验室学习-c++ Exercises with the answer. PDG format. China IT laboratory study
- 2022-01-23 10:24:02下载
- 积分:1
-
编译原理源代码欢迎来
编译原理源代码欢迎来-principle source code compiler welcome to Kankan
- 2022-02-03 18:35:58下载
- 积分:1
-
I have written Haskell language implementation of the AES algorithm
自己编写的 AES算法 用Haskell语言实现 -I have written Haskell language implementation of the AES algorithm
- 2022-01-26 02:55:04下载
- 积分:1
-
a good mahjong procedures, from Jiangxi Jiujiang of mahjong rules
一个不错的麻将程序,取自江西九江的麻将规则-a good mahjong procedures, from Jiangxi Jiujiang of mahjong rules
- 2022-08-24 17:39:37下载
- 积分:1
-
一个带菜单的按钮VC源码
一个带菜单的按钮VC源码-a menu button with VC FOSS
- 2023-08-18 20:25:04下载
- 积分:1
-
模仿Windows任务栏希望大家多学习
模仿Windows任务栏希望大家多学习-imitate the Windows task bar hope we learn more
- 2022-02-06 06:21:01下载
- 积分:1
-
ITU标准目录,列出标准所有的目录,以备查找。
ITU标准目录,列出标准所有的目录,以备查找。-ITU standard directory, listing all the standard directory for finding.
- 2022-02-28 16:18:40下载
- 积分:1
-
直接文件保存的配置信息, 可以替代INI文件,也可以替代注册表 保存你的应用程序的配置信息 附带编辑器...
直接文件保存的配置信息, 可以替代INI文件,也可以替代注册表 保存你的应用程序的配置信息 附带编辑器 -directly saving the file configuration information can replace INI file, but also can replace the registry to keep your application"s configuration information fringe Editor
- 2023-04-29 20:10:03下载
- 积分:1