type.h

来自「机器人足球,是用c语言实现的。大概有两千行」· C头文件 代码 · 共 38 行

H
38
字号
/*球场,足球,机器人的数据结构*/

typedef struct
{
	int color;
	float position[4];
}FootballPitch;

typedef struct
{
	int color;
	float ball_x;
	float ball_y;
	float init_speed;
	float radius;
	float direction_angle;
	float friction_factor;
}Football;

typedef struct
{
	int number;
	char team;
	float sidelength;
	int color;
	float position_x;
	float position_y;
	float small_speed;
	float big_speed;
	float forward_speed;
	float direction; /*the smallest angle from the robot to the ball*/
	float decline;  /*the angle that robot changes every time*/
	float reverse_radius;
	float reverse_factor;
	float direction_indicator;  /*the angle that the robot faces to*/
	float shoot_angle;
}Robot;

⌨️ 快捷键说明

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