Package bluegammon.io

The bluegammon.io package defines common behaviour for setting up a remote game, and contains one implementation of this using bluetooth.

See:
          Description

Interface Summary
BackgammonConnection This interface defines needed methods for connecting to another device on a remote backgammon game.
 

Class Summary
BackgammonBTConnection Implementation of the interface BackgammonConnection for bluetooth bearer.
BluetoothFacade Facade for JSR82, connecting via the btspp protocol.
Handshake A Handshake consists of sending and receiving data as specified below, where one player has server role and the other has client role.
PlayerListenerProxy This class serializes all events from sent to a PlayerListener and sends them to specified output stream.
 

Package bluegammon.io Description

The bluegammon.io package defines common behaviour for setting up a remote game, and contains one implementation of this using bluetooth.

Concepts and Structures

There are three central classes in this package:

Class diagrams

A class diagram over a fully setup distributed game is depicted below:

Here, the RemotePlayer receives events via its InputStream. The PlayerListenerProxy sends all events from PlayerListener via its OutputStream.