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 booleancanDoSeparateDiceprotected Stringdescriptionprotected booleanemailOnlyprotected intmaxEmailsprotected intmaxRollsprotected Stringnameprotected booleanpasswdRequiredprotected Stringpasswordprotected StringprimaryEmailprotected Randomranprotected StringsecondaryEmailprotected StringserverURLprotected booleanuseEmail -
Constructor Summary
Constructors Constructor Description DieServer() -
Method Summary
Modifier and Type Method Description abstract String[]buildInternetRollString(RollSet mr)voiddoInbuiltRoll(RollSet mroll)voiddoInternetRoll(RollSet mroll, FormattedString format)voiddoIRoll(RollSet toss)StringextractEmail(String email)Extract the portion of the email address withing the angle brackets.protected StringformatResult(String description, String result, FormattedString format)Use the configured FormattedString to format the result of a rollStringgetDescription()intgetMaxEmails()StringgetName()int[]getnDiceList()int[]getnSideList()StringgetPasswd()StringgetPrimaryEmail()protected StringgetReportPrefix(String d)The text reported before the results of the rollStringgetSecondaryEmail()booleangetUseEmail()booleanisPasswdRequired()abstract voidparseInternetRollString(RollSet rollSet, Vector<String> results)voidreportResult(RollSet mroll, FormattedString format)abstract voidroll(RollSet mr, FormattedString format)voidsetPasswd(String s)voidsetPrimaryEmail(String e)voidsetSecondaryEmail(String e)voidsetUseEmail(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 -
primaryEmail
-
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 -
doInbuiltRoll
-
doInternetRoll
-
formatResult
Use the configured FormattedString to format the result of a roll- Parameters:
result-- Returns:
-
reportResult
-
doIRoll
- Throws:
IOException
-
extractEmail
Extract the portion of the email address withing the angle brackets. Allows Email addresses like 'Joe Blow'
-