Class DieServer

java.lang.Object
VASSAL.build.module.dice.DieServer
All Implemented Interfaces:
Auditable
Direct Known Subclasses:
BonesDiceServer, ShadowDiceDieServer

public abstract class DieServer extends Object implements Auditable
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 Details

    • ran

      protected Random ran
    • name

      protected String name
    • description

      protected String description
    • emailOnly

      protected boolean emailOnly
    • maxRolls

      protected int maxRolls
    • maxEmails

      protected int maxEmails
    • serverURL

      protected String serverURL
    • passwdRequired

      protected boolean passwdRequired
    • password

      protected String password
    • useEmail

      protected boolean useEmail
    • primaryEmail

      protected String primaryEmail
    • secondaryEmail

      protected String secondaryEmail
    • canDoSeparateDice

      protected boolean canDoSeparateDice
  • Constructor Details

    • DieServer

      public DieServer()
  • Method Details

    • buildInternetRollString

      public abstract String[] buildInternetRollString(RollSet mr)
    • parseInternetRollString

      public abstract void parseInternetRollString(RollSet rollSet, Vector<String> results)
    • roll

      public abstract void roll(RollSet mr, FormattedString format)
    • getnDiceList

      public int[] getnDiceList()
    • getnSideList

      public int[] getnSideList()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • isPasswdRequired

      public boolean isPasswdRequired()
    • getPasswd

      public String getPasswd()
    • setPasswd

      public void setPasswd(String s)
    • setPrimaryEmail

      public void setPrimaryEmail(String e)
    • getPrimaryEmail

      public String getPrimaryEmail()
    • setSecondaryEmail

      public void setSecondaryEmail(String e)
    • getSecondaryEmail

      public String getSecondaryEmail()
    • setUseEmail

      public void setUseEmail(boolean use)
    • getUseEmail

      public boolean getUseEmail()
    • getMaxEmails

      public int getMaxEmails()
    • getReportPrefix

      protected String getReportPrefix(String d)
      The text reported before the results of the roll
    • doInternetRoll

      public void doInternetRoll(RollSet mroll, FormattedString format)
    • formatResult

      protected String formatResult(String description, String result, FormattedString format)
      Use the configured FormattedString to format the result of a roll
      Parameters:
      description - Roll Description
      result - Roll Result
      format - Report Format
      Returns:
      Formatted roll result
    • reportResult

      public void reportResult(RollSet mroll, FormattedString format)
    • doIRoll

      public void doIRoll(RollSet toss) throws IOException
      Throws:
      IOException
    • extractEmail

      public String extractEmail(String email)