Next: mod-brute, Previous: libliquidwar6, Up: C API [Contents][Index]
View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/index.html.
backend: backend to use
seed: parameters required to build bot (game state, among other things)
Initializes a bot object. Must be performed before any other call. The seed is absolutely required, for a bot really needs to know what map/context it’s working on, including at creation time
Return value: 1 on success, 0 on failure.
backend: unitialize a bot backend
Closes a bot, but does not free all ressources.
backend: bot to work on
x: next x position (out param)
y: next y position (out param)
Queries the bot for its next move, this is actually the one interesting function in the whole bot API.
Return value: 1 on success, 0 on failure.
backend: bot to represent
Gives a human readable representation of bot
Return value: dynamically allocated string.
argc: argc, as passed to main
argv: argv, as passed to main
List available bot backends. The hash contains pairs with id and name for each backend. The id is the technical key you can use to load the backend, the name is something more readable you can display in an interface. The backend objects themselves are not instanciated by this (in fact, they are, but released on the fly) you need to load and initialize them afterwards.
Return value: hash containing id/name pairs.
argc: argc, as passed to main
argv: argv, as passed to main
name: string containing bot key, typically got from lw6bot_get_backends
Creates a bot backend, this is just about loading the dynamic library if needed, and/or check bot engine is available, and connect to it. It does not perform initialization.
Return value: bot backend.
backend: bot backend to destroy
Frees the ressources associated to a bot, which must have been properly uninitialized before.
Return value: none.
mode: 0 for check only, 1 for full test
Runs the bot
module test suite. Will try several engines
and query basic moves.
Return value: 1 if test is successfull, 0 on error.
Next: mod-brute, Previous: libliquidwar6, Up: C API [Contents][Index]