- 博客(0)
- 资源 (3)
- 收藏
- 关注
烟花c语言源代码 编程的孩子都看看吧
很不错的程序!
#include
#include
#include
#include
#include
#include
#include
#define p1 3.14159
void moon()
{int x=50,y=50,n=30;
setcolor(YELLOW);
setfillstyle(1,YELLOW);
ellipse(x,y,0,360,n,n);
ellipse(x+n/2,y,90,270,n,n);
floodfill(x-n+3,y,YELLOW);
setcolor(BLACK);
circle(x,y,n);
circle(x+n/2,y,n);
}................
.........
.......
...
2010-09-11
五子棋游戏源代码 c语言 能运行正确
一个很好的五子棋c语言源程序代码,最重要的是能运行正确!!!
#include
#include
#include
#include
#include
#define CROSSRU 0xbf /*右上角点*/
#define CROSSLU 0xda /*左上角点*/
#define CROSSLD 0xc0 /*左下角点*/
#define CROSSRD 0xd9 /*右下角点*/
#define CROSSL 0xc3 /*左边*/
#define CROSSR 0xb4 /*右边*/
#define CROSSU 0xc2 /*上边*/
#define CROSSD 0xc1 /*下边*/
#define CROSS 0xc5 /*十字交叉点*/
/*定义棋盘左上角点在屏幕上的位置*/
#define MAPXOFT 5
#define MAPYOFT 2
/*定义1号玩家的操作键键码*/
#define PLAY1UP 0x1157/*上移--'W'*/
#define PLAY1DOWN 0x1f53/*下移--'S'*/
#define PLAY1LEFT 0x1e41/*左移--'A'*/
#define PLAY1RIGHT 0x2044/*右移--'D'*/
#define PLAY1DO 0x3920/*落子--空格键*/
/*定义2号玩家的操作键键码*/
#define PLAY2UP 0x4800/*上移--方向键up*/
#define PLAY2DOWN 0x5000/*下移--方向键down*/
#define PLAY2LEFT 0x4b00/*左移--方向键left*/
#define PLAY2RIGHT 0x4d00/*右移--方向键right*/
#define PLAY2DO 0x1c0d/*落子--回车键Enter*/
/*若想在游戏中途退出, 可按 Esc 键*/
#define ESCAPE 0x011b
/*定义棋盘上交叉点的状态, 即该点有无棋子 */
/*若有棋子, 还应能指出是哪个玩家的棋子 */
#define CHESSNULL 0 /*没有棋子*/
#define CHESS1 'O'/*一号玩家的棋子*/
#define CHESS2 'X'/*二号玩家的棋子*/
/*定义按键类别*/
#define KEYEXIT 0/*退出键*/
#define KEYFALLCHESS 1/*落子键*/
#define KEYMOVECURSOR 2/*光标移动键*/
#define KEYINVALID 3/*无效键*/
下载可看到完整的...
2010-09-11
贪吃蛇程序 c语言 可以运行正确
此程序为一个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;
struct Food
{
int x;
int y;
int yes;
}food;
struct Snake
{
int x[N];
int y[N];
int node;
int direction;
int life;
......下载 可查看完整的程序
2010-09-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人