An example plugin was implemented with extensive documentation. Additional mails were added to the notification system, for voting and picking. A few bugs were fixed and the release number of cardstories bumped to 1.0.5 with adaptations to run on Fedora14.
example plugin
The example plugin was implemented to be used as a guide and a reference for plugin implementers. The body of the plugin is fully functional but only enumerate all possible cases. For instance, the accept function is documented to receive an event that occurs when a player picks a card:
# # Received each time a player picks a card. A player # may pick a card multiple times and only the latest # is taken into account. # elif details['type'] == 'pick': details['player_id'] # numerical player id details['card'] # numerical card id
A plugin implementer could copy the example plugin and start from it, adding the desired functions where appropriate. The code of the example function is extensively tested (100% coverage). However it is not recommended to use these tests as a basis for the tests of a new plugins. Using an existing plugin tests is a better choice because it will be less bloated and could only focus on the essential parts.