bounce.h

来自「该程序完善了《UnixLinux编程实践教程》中的弹球功能」· C头文件 代码 · 共 31 行

H
31
字号
/* bounce.h			*/

/* some settings for the game	*/

#define	BLANK		' '
#define	WALL		'|'
#define	TARGET		'O'
#define BOARD		'='
#define	DFL_SYMBOL	'*'
#define	TOP_ROW		5
#define	BOT_ROW 	20
#define	LEFT_EDGE	10
#define	RIGHT_EDGE	70
#define	X_INIT		10		/* starting col		*/
#define	Y_INIT		10		/* starting row		*/
#define	TICKS_PER_SEC	50		/* affects speed	*/

#define	X_TTM		8
#define	Y_TTM		5

/** the ping pong ball **/

struct ppball {
		int	y_pos, x_pos,
			y_ttm, x_ttm,
			y_ttg, x_ttg,
			y_dir, x_dir;
		char	symbol ;

	} ;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?