readme.txt

来自「FIRA 5V5比赛中一个机器人源代码 本科毕业设计做的」· 文本 代码 · 共 17 行

TXT
17
字号
The Strategy project is based on the Win32 DLL wizard option in VC++.

It contains a sample strategy and can be compiled down and placed in the Director folder to be used.

Developers can use this project as a starting point for developing a DLL-based strategy. 

The project creates a Strategy.dll file, however, any file name should be acceptable as long as the Director program allows users to select their own strategy DLLs.

The Strategy.h file contains the function prototypes which will be exported from the DLL: Create, Strategy, and Destroy. And also the Environment structure.

The Environment structure is passed into the Strategy function and is used to access information about the robots, ball and field. It can also be used to set the velocities of the robots.

Global data is not possible in the DLL as both robot teams may wish to use the same DLL file. So a user structure can be allocated and assigned to the userData field in Environment.h.

Because user data only needs to be allocated once it can be done in the Create function which is called once when the Xtra is loaded.

The user data can be freed in the Destroy function which is called when the Xtra is unloaded.

⌨️ 快捷键说明

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