MiniCards Mod API Reference

Modding API Globals

The modding API exports the following prototypes and instances into the global namespace:

Prototypes

Achievement
Prototype for the Achievement class
Action
Base prototype for all actions
ActionInfo
Prototype for player action metadata
Card
Card class prototype
Encode
Prototype for HTML encoding functions
Game
Prototype for the game. In order to implement a card game, at a minimum you should implement the following methods: new, can_start, start, get_state.
GameState
Prototype for game states
Hand
Prototype for a player's hand. This is implemented as a list of Card instances
MatchType
Prototype for MatchType enum
MessageAction
Prototype for MessageAction constants
Pack
Prototype for a pack of cards before it is dealt.
PileChangedEvent
Prototype for pile change events
Player
Prototype for the Player class
PlayerBroadcastMessageEvent
Prototype for message broadcast events
PlayerState
Enum for player activity state
Rank
The enum for the ranks of standard playing cards.
Resources
Utilities for accessing localised resources. Resources are stored in the resources.properties file in the mod directory. The resources file is a standard Java properties file.NB. support for localisation is not yet fully implemented. An instance of the resource file can be obtained from the GameProvider
SettingInfo
Prototype for game settings
SortHandAction
Predefined action prototype that sorts the player's hand
Stat
Constants for names of reserved stats.
Suit
Prototype for suits
Table
The game table
TablePile
Represents a pile of cards on the table.

Global Instances

echo
Controls whether command inputs are echoed to the console. The default is true.
game
The current game instance
help
This help
io
Provides sandboxed access to read mod files.
minicards.ops
Utilities for console IO
url_constants
Useful URL Constants