-
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
-
for:
Root of a Polynomial
for:
Root of a Polynomial
--- --- --- --- --
Time Limit: 1 Second Memory Limit: 32768 KB
--------------------------------------------------------------------------------
A polynomial of degree n has the common form as . Your task is to write a function to find a root of a given polynomial in a given interval.
Format of function
double Polynomial_Root(int n, double c[], double a, double b, double EPS)
where int n is the degree of the polynomial double c[] is an array of n +1 coefficients , , ..., , and of the given polynomial double a and b are the two end-points of the given interval and double EPS is the accuracy of the root.
The function must return the root.
Note: It is guaranteed that a unique real number r exists in the given interval such that p(r) = 0. -for: Root of a Polynomial---------------------- Time Limit: 1 Second Memory Limit: 32768 KB-------------------------------------------------------------------------------- A polynomi
- 2022-09-28 19:15:03下载
- 积分:1
-
In touch application to cd boxes enclosure
In touch application to cd boxes enclosure
- 2022-01-25 21:46:00下载
- 积分:1
-
emb.zip: Earth
emb.zip: Earth-moon barycenter size 21KB.
Trigonometric expansion for the location of the Earth-Moon barycenter. A high precision fit to DE102.
地球月球之间质心计算公式。-emb.zip: Earth-moon barycenter size 21KB. Trigonometric expansion for the location of the Earth-Moon barycenter. A high precision fit to DE102. Earth
- 2022-02-02 15:42:14下载
- 积分:1
-
windows 编程基础知识,讲解清楚透彻,windows初学者有极大的帮助!...
windows 编程基础知识,讲解清楚透彻,windows初学者有极大的帮助!-basic knowledge of windows programming, on a clear and thorough, windows have great help for beginners!
- 2022-06-14 05:26:34下载
- 积分:1
-
this is a airlines project system
this is a airlines project system
- 2022-07-14 01:38:19下载
- 积分:1
-
SAMSUNG S3C2410 烧写软件,用来引导WINCE启动 U2410MON.BIN
SAMSUNG S3C2410 烧写软件,用来引导WINCE启动 U2410MON.BIN-burning software, used to guide pulled launched U2410MON.BIN
- 2022-11-01 17:10:04下载
- 积分:1
-
Based on wince5.0 under, PXA270 the I2C driver source code can be used with I2C...
基于wince5.0下的,PXA270的I2C驱动源码,可以用在具有I2C的硬件平台,其它CPU也可以借鉴。-Based on wince5.0 under, PXA270 the I2C driver source code can be used with I2C hardware platform also can learn from the other CPU.
- 2022-07-28 02:22:15下载
- 积分:1
-
VB Americans have done to commemorate the 911 screensaver
VB美国人做的纪念911的屏保-VB Americans have done to commemorate the 911 screensaver
- 2022-03-17 02:21:25下载
- 积分:1
-
包含复选框的组合框
下拉组合框中的内容包含复选框,可实现下拉多选功能。CheckComboBox.h和CheckComboBox.cpp中的CCheckComboBox通过继承CComboBox来实现
- 2023-04-21 17:15:04下载
- 积分:1