The interface must provide implementations of these error-handling functions:
void low_init_warning(str)
This is for undesirable but not necessarily
wrong things that happen while setting up a game. For instance,
if players start out too close or too far from each other, it will
often affect the play of the game adversely, so the kernel issues
a warning, therby giving the prospective players a chance to cancel
the game and start over. The kernel's warning message should
indicate any likely results of continuing on, so the players can
decide whether or not to chance it.
low_init_error(str)
This function should indicate a serious and unrecoverable error
during initialization. It should not return to its caller.
low_run_warning(str)
Warnings during the game are rare but not unknown.
They are very often due to bugs in Xconq
, so any
occurrence should be investigated further. It is possible
for some game designs to have latent flaws that may result
in a warning.
In any case, the interface should allow the players to continue
on, to save their game and quit, by calling save_the_game
,
or else quit without saving anything.
low_run_error(str)
In the worst case, Xconq can get into a situation, such as
memory exhaustion, where there is no way to continue. The kernel
will then call run_error
, which should inform players that
Xconq must shut itself down. They do get the option of saving
the game, and the routine should call save_game_state??
to
do this safely. This routine should also not return to its caller.
printlisp(obj)
This is needed to print GDL objects to "stdout" or its equivalent.