Interface Die

All Known Implementing Classes:
D10, D100, D12, D2, D20, D4, D6, D8, GenericNumericDie

public interface Die
Since:
2020-08-12
Author:
rlichti <rlichti@kaiserpfalz-edv.de>
  • Method Details

    • roll

      DieResult roll()
      a single die roll.
      Returns:
      result of the single die roll.
    • roll

      DieResult[] roll(int number)
      the result of multiple dice rolls.
      Parameters:
      number - the number of dice rolls.
      Returns:
      ann array of Integer containing the results. The first element contains the sum, starting with index 1 the results of the single rolls are returned.
    • getLookupTable

      default Optional<LookupTable> getLookupTable()
      Returns:
      returns the lookup table to compare the total to and print as result.
    • getDieType

      default String getDieType()
      Returns:
      The name of the die.
    • isNumericDie

      boolean isNumericDie()
      Returns:
      TRUE, if the result can be parsed as integer (and therefore calculations can be done)