19 if (commandList != NULL)
31 if (commandList != NULL)
33 for (
size_t index = 0; index < commandList->
commands_count; index++)
49 if (commandList != NULL && moveCommand != NULL)
void MoveCommandList_Clear(MoveCommandList *commandList)
Clear the given MoveCommandList, freeing up any allocated resources, so the list can be reused.
void MoveCommandList_Initialize(MoveCommandList *commandList)
Initialize the given MoveCommandList object. This should be the first function called for an uninitia...
bool MoveCommandList_Add(MoveCommandList *commandList, MoveCommand *moveCommand)
Add a given MoveCommand object to the given MoveCommandList object. The MoveCommandList takes ownersh...
Declaration of the MoveCommandList structure along with the support functions, MoveCommandList_Initia...
Represents a move command. A move command has a name and the command character that represents the co...
Represents a list of MoveCommand objects.
MoveCommand ** commands
Array of pointers to MoveCommand objects.
size_t commands_count
Number of commands in the commands array.