Tutorial: How to Write a Plug-in

Note: This tutorial is currently out of date.  It will hopefully be updated soon.

Contents

Overview

This tutorial will lead you through the steps of writing a plug-in for Combinatorial Game Suite.  The focus is on implementing two sample games: a partizan variant of the classic game nim; and the game of Fission, invented by Michael Albert.  A few other examples are discussed to illustrate some additional techniques.  Remember that this tutorial is just an introduction - it is by no means a comprehensive guide to CGSuite's features.  For more detailed information, consult the Combinatorial Game Suite API.

Some experience with Java programming is assumed; if you're new to Java or need to brush up, you can find an excellent tutorial at:
http://java.sun.com/docs/books/tutorial/

Note to users of previous versions: The plug-in system and this tutorial have been extensively updated to coincide with the release of version 0.6.  It's advisable to read through this tutorial even if you're familiar with the version 0.5 plug-in system.  Some new features have been introduced, and the task of implementing others has been eased.  Further, there have been some API changes that might require older plug-ins to be revised.  For a complete list of API changes, see: http://www.cgsuite.org/renames.html


Continue on to Building the Plug-in