Package-level declarations

Types

Link copied to clipboard
typealias Interaction = (item: Item) -> InteractionResult

Provides a lambda signature for interactions with an item to return a InteractionResult.

Link copied to clipboard

Enumeration of possible effects to an interaction.

Link copied to clipboard
class InteractionResult(val effect: InteractionEffect, val item: Item, descriptionOfInteraction: String?) : Result

Describes the result of an interaction, detailing the effect that the interaction between the item and the target had. If descriptionOfInteraction is null the description property will return a generated description, otherwise the descriptionOfInteraction will be returned.

Link copied to clipboard
fun interface InteractWithItem

Provides a contract for any object that can be a target for an interaction with an Item.

Link copied to clipboard
data class Reaction(val result: ReactionResult, val description: String)

Provides a reaction consisting of both a result and a description.

Link copied to clipboard

Possible results from a Reaction.

Link copied to clipboard
interface Result

Provides a general interface that provides a description as a result.