org.jogre.comm
Class CommOfferDraw
java.lang.Object
|
+--org.jogre.comm.CommSimpleMessage
|
+--org.jogre.comm.CommTableMessage
|
+--org.jogre.comm.CommInvite
|
+--org.jogre.comm.CommOfferDraw
- All Implemented Interfaces:
- ITransmittable
- public class CommOfferDraw
- extends CommInvite
Communications object which is used when one user offers a draw to another
user.
- Version:
- Alpha 0.1
- Author:
- Bob Marks
Constructor Summary |
CommOfferDraw(String inString)
Constructor which creates a CommOfferDraw object from the flatten ()
method of another CommInvite object. |
CommOfferDraw(String username,
int status,
int tableNum)
Constructor which is called from the server and the client who is
offering the draw - they are unsure of who the draw is being offered to
so the usernameTo (from CommInvite) isn't used. |
CommOfferDraw(String username,
int status,
int tableNum,
String usernameTo)
Constructor for a CommOfferDraw object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOT_DEFINED
public static final String NOT_DEFINED
- Username to is not defined.
CommOfferDraw
public CommOfferDraw(String username,
int status,
int tableNum)
- Constructor which is called from the server and the client who is
offering the draw - they are unsure of who the draw is being offered to
so the usernameTo (from CommInvite) isn't used.
- Parameters:
username
- status
- tableNum
-
CommOfferDraw
public CommOfferDraw(String username,
int status,
int tableNum,
String usernameTo)
- Constructor for a CommOfferDraw object. This constructor is created
from the client. The additional field is the usernameTo.
- Parameters:
username
- User who send the CommInvite object.status
- Status of the message i.e. request, accept & decline.tableNum
- Table number of the message.usernameTo
- Username that is being offered the draw to.
CommOfferDraw
public CommOfferDraw(String inString)
throws TransmissionException
- Constructor which creates a CommOfferDraw object from the flatten ()
method of another CommInvite object.
- Parameters:
inString
- - Throws:
TransmissionException
-
isPlayerToSet
public boolean isPlayerToSet()
- Return true if the playerTo String has been set.
- Returns:
- True if playerTo is not equal to NON_DEFINED.
flatten
public String flatten()
- Flatten the String.
- Overrides:
flatten
in class CommInvite
- See Also:
ITransmittable.flatten()