19 if (commandName != NULL && executeFunction != NULL)
22 if (moveCommand != NULL)
26 moveCommand->
Execute = executeFunction;
38 if (moveCommand != NULL)
void MoveCommand_Destroy(MoveCommand *moveCommand)
Destroy the specified MoveCommand object. After this function returns, the pointer to the MoveCommand...
MoveCommand * MoveCommand_Create(char commandToken, const char *commandName, ExecuteFunction executeFunction)
Create a MoveCommand object and initialize it with the given arguments.
Declaration of the MoveCommand structure along with the support functions, MoveCommand_Create() and M...
void(* ExecuteFunction)(void)
Alias for a function that executes a move command.
Represents a move command. A move command has a name and the command character that represents the co...
char commandToken
The character that represents this move command in a string.
const char * commandName
The name of this move command.
ExecuteFunction Execute
The function to call to execute the move command (this varies for each command)