Package VASSAL.build.module.dice
Class DieServer
java.lang.Object
VASSAL.build.module.dice.DieServer
- Direct Known Subclasses:
BonesDiceServer
,ShadowDiceDieServer
public abstract class DieServer extends Object
Base DieServer Class
Does most of the work. Individual Die Servers just need to implement
buildInternetRollString(VASSAL.build.module.dice.RollSet)
and parseInternetRollString(VASSAL.build.module.dice.RollSet, java.util.Vector<java.lang.String>)
methods.-
Field Summary
Fields Modifier and Type Field Description protected boolean
canDoSeparateDice
protected String
description
protected boolean
emailOnly
protected int
maxEmails
protected int
maxRolls
protected String
name
protected boolean
passwdRequired
protected String
password
protected String
primaryEmail
protected Random
ran
protected String
secondaryEmail
protected String
serverURL
protected boolean
useEmail
-
Constructor Summary
Constructors Constructor Description DieServer()
-
Method Summary
Modifier and Type Method Description abstract String[]
buildInternetRollString(RollSet mr)
void
doInbuiltRoll(RollSet mroll)
Deprecated, for removal: This API element is subject to removal in a future version.void
doInternetRoll(RollSet mroll, FormattedString format)
void
doIRoll(RollSet toss)
String
extractEmail(String email)
protected String
formatResult(String description, String result, FormattedString format)
Use the configured FormattedString to format the result of a rollString
getDescription()
int
getMaxEmails()
String
getName()
int[]
getnDiceList()
int[]
getnSideList()
String
getPasswd()
String
getPrimaryEmail()
protected String
getReportPrefix(String d)
The text reported before the results of the rollprotected String
getReportSuffix()
Deprecated, for removal: This API element is subject to removal in a future version.No Replacement, handled by Message formatString
getSecondaryEmail()
boolean
getUseEmail()
boolean
isPasswdRequired()
abstract void
parseInternetRollString(RollSet rollSet, Vector<String> results)
void
reportResult(RollSet mroll, FormattedString format)
abstract void
roll(RollSet mr, FormattedString format)
void
setPasswd(String s)
void
setPrimaryEmail(String e)
void
setSecondaryEmail(String e)
void
setUseEmail(boolean use)
-
Field Details
-
ran
-
name
-
description
-
emailOnly
protected boolean emailOnly -
maxRolls
protected int maxRolls -
maxEmails
protected int maxEmails -
serverURL
-
passwdRequired
protected boolean passwdRequired -
password
-
useEmail
protected boolean useEmail -
-
secondaryEmail
-
canDoSeparateDice
protected boolean canDoSeparateDice
-
-
Constructor Details
-
DieServer
public DieServer()
-
-
Method Details
-
buildInternetRollString
-
parseInternetRollString
-
roll
-
getnDiceList
public int[] getnDiceList() -
getnSideList
public int[] getnSideList() -
getName
-
getDescription
-
isPasswdRequired
public boolean isPasswdRequired() -
getPasswd
-
setPasswd
-
setPrimaryEmail
-
getPrimaryEmail
-
setSecondaryEmail
-
getSecondaryEmail
-
setUseEmail
public void setUseEmail(boolean use) -
getUseEmail
public boolean getUseEmail() -
getMaxEmails
public int getMaxEmails() -
getReportPrefix
The text reported before the results of the roll -
getReportSuffix
Deprecated, for removal: This API element is subject to removal in a future version.No Replacement, handled by Message formatThe text reported after the results of the roll; -
doInbuiltRoll
Deprecated, for removal: This API element is subject to removal in a future version. -
doInternetRoll
-
formatResult
Use the configured FormattedString to format the result of a roll- Parameters:
description
- Roll Descriptionresult
- Roll Resultformat
- Report Format- Returns:
- Formatted roll result
-
reportResult
-
doIRoll
- Throws:
IOException
-
extractEmail
-