SugarCube
Class SugarCube

java.lang.Object
  |
  +--SugarCube.SugarCube

public class SugarCube
extends java.lang.Object

This is the SugarCube which is communicating with the SuperCube.


Constructor Summary
SugarCube()
          SugarCube constructor.
 
Method Summary
 void addParticipant(java.lang.String Participant)
          Sends a AddParticipant request to SuperCube.
 void connect()
          Connects to the SuperCube.
 java.lang.String getFirstParticipant()
          Sends a GetFirstParticipant request to SuperCube.
 java.lang.String getLastParticipant()
          Sends a LastParticipant request to SuperCube.
 java.lang.String getNextParticipant()
          Sends a NextParticipant request to SuperCube.
 java.lang.String GetStatistics()
          Sends a statistic request to SuperCube.
 boolean isConnected()
          Returns the true if connected, false if not.
static void main(java.lang.String[] args)
          Main, starts up the SugarCube and its GUI.
 CubePacket RecivePacket()
          Recives a packet from SuperCube.
 void Save()
          Sends a Save request to SuperCube.
 void SendPacket(CubePacket p)
          Sends a packet to SuperCube.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SugarCube

public SugarCube()
SugarCube constructor.
Method Detail

connect

public void connect()
Connects to the SuperCube.

isConnected

public boolean isConnected()
Returns the true if connected, false if not.
Returns:
true if connected, false if not.

SendPacket

public void SendPacket(CubePacket p)
Sends a packet to SuperCube.

RecivePacket

public CubePacket RecivePacket()
Recives a packet from SuperCube.

Save

public void Save()
Sends a Save request to SuperCube.

GetStatistics

public java.lang.String GetStatistics()
Sends a statistic request to SuperCube.

addParticipant

public void addParticipant(java.lang.String Participant)
Sends a AddParticipant request to SuperCube.
Parameters:
Participants - the participant to add at SuperCube.

getFirstParticipant

public java.lang.String getFirstParticipant()
Sends a GetFirstParticipant request to SuperCube.
Returns:
the first participant.

getNextParticipant

public java.lang.String getNextParticipant()
Sends a NextParticipant request to SuperCube.
Returns:
the next participant.

getLastParticipant

public java.lang.String getLastParticipant()
Sends a LastParticipant request to SuperCube.
Returns:
the last participant.

main

public static final void main(java.lang.String[] args)
Main, starts up the SugarCube and its GUI.