kxg.tokens

Classes

Token()

TokenExtension(actor, token)

TokenSafetyChecks(name, bases, members)

Add checks to make sure token methods are being called safely.

World()

Manage all of the tokens participating in the game.

Functions

read_only(method)

Indicate that a given Token method will not change the state of the world, and is therefore safe to call at any time.

require_active_token(object)

Raise an ApiUsageError if the given object is not a token that is currently participating in the game.

require_token(object)

Raise an ApiUsageError if the given object is not a fully constructed instance of a Token subclass.

require_world(object)

Raise an ApiUsageError if the given object is not a fully constructed World instance.

watch_token(method)

Mark a token extension method that should automatically be called when a token method of the same name is called.