[sugar] new activity: connect game

Dafydd Harries dafydd.harries at collabora.co.uk
Thu Apr 26 08:45:56 EDT 2007


I've written a new activity: a two-player implementation of Connect Four,
(http://en.wikipedia.org/wiki/Connect_Four). Essentially, you take turns to
drop pieces into columns, trying to make a line of four.

What's significant about this activity is that it uses the networked D-Bus
service provided by Telepathy (aka "Tubes") to perform the communication, and
is the first program to do so.

Prerequisites:

 - a copy of D-Bus with the dbus_message_(de)marshal functions patched in;
   this patch is in CVS, so sugar-jhbuild dbus is fine
 - the "tubes" branch of Telepathy Gabble

Git repository:

http://projects.collabora.co.uk/~daf/connect-activity.git/

Caveats:

 - has a race condition where an activity instance will not notice the other
   player also waiting for the game
 - doesn't detect when the game has been won
 - doesn't allow for restarting the game
 - controls are keyboard-only
 - hardcodes activity channel to use; in time, once the presence service does
   invitations, it won't need to do this

-- 
Dafydd


More information about the Sugar mailing list