CustomCommand

class CustomCommand(val commandHelp: CommandHelp, var isPlayerVisible: Boolean, callback: CustomAction) : Command, PlayerVisible

Provides a mechanism for allowing custom commands to be added. commandHelp provides help for the command, isPlayerVisible allows the visible state for the player to be toggled. callback provides a CustomAction that is invoked when the Command is invoked.

Constructors

Link copied to clipboard
constructor(commandHelp: CommandHelp, isPlayerVisible: Boolean, callback: CustomAction)

Properties

Link copied to clipboard

Any arguments to be provided when the CustomCommand is invoked.

Link copied to clipboard
Link copied to clipboard
open override var isPlayerVisible: Boolean

Returns true if visible to the player, else false.

Functions

Link copied to clipboard
open override fun invoke(game: Game): Reaction

Invoke the Command on the game to obtain a Reaction.