-
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
-
MinDriverInVc.rar
MinDriverInVc.rar
- 2023-06-17 05:20:03下载
- 积分:1
-
This the VB6 code for Dot Matrix in VB6,
This the VB6 code for Dot Matrix in VB6,-This is the VB6 code for Dot Matrix in VB6,
- 2022-01-26 00:53:32下载
- 积分:1
-
PB例子用实例来介绍powerbuilder8.0的应用功能
PB例子用实例来介绍powerbuilder8.0的应用功能 -PB examples used to introduce examples of the application functions powerbuilder8.0
- 2022-02-04 03:42:25下载
- 积分:1
-
c# ftp 管理器
c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器c# ftp 管理器
- 2022-03-07 06:25:26下载
- 积分:1
-
中国象棋实现ai算法,棋力相当,带开局库
资源描述废话不多说,中国象棋,采用win32编写,代码优雅,运行速度快.实现了人工智能,采用pvs搜索算法,置换表,;历史表,杀手招法等加强算法.最重要的是已实现开局库加载.大家尽情的享受吧.
- 2023-06-27 18:35:04下载
- 积分:1
-
实现了简单的记录键盘事件到文件中,欢迎大家改动
实现了简单的记录键盘事件到文件中,欢迎大家改动-Realize a simple record of keyboard events to a file, welcomed the changes to U.S.
- 2022-06-11 12:50:45下载
- 积分:1
-
灰色按钮克星(精简加完整源码) 有效突破灰色按钮
灰色按钮克星(精简加完整源码) 有效突破灰色按钮
-Gray button nemesis (plus complete source code to streamline) effective breakthrough in the gray button
- 2022-03-12 18:41:46下载
- 积分:1
-
WinCE下的文本和背景显示
WinCE下文本及背景显示-under WinCE text and background display
- 2023-09-03 08:40:03下载
- 积分:1
-
地图着色问题又称为“四色问题”,四色问题的内容是:“任何一张地图只用四种颜色就能使具有共同边界的国家着上不同的颜色...
地图着色问题又称为“四色问题”,四色问题的内容是:“任何一张地图只用四种颜色就能使具有共同边界的国家着上不同的颜色-map also known as the "four color", the four-color problem is the content : "Anyone with a map of only four colors will be able to have a common border with the country on different colors
- 2022-01-30 17:20:43下载
- 积分:1