Package de.kaiserpfalzedv.rpg.core.dice
Interface Die
public interface Die
- Since:
- 2020-08-12
- Author:
- rlichti <rlichti@kaiserpfalz-edv.de>
-
Method Summary
Modifier and TypeMethodDescriptiondefault Stringdefault Optional<LookupTable> booleanroll()a single die roll.roll(int number) the result of multiple dice rolls.
-
Method Details
-
roll
DieResult roll()a single die roll.- Returns:
- result of the single die roll.
-
roll
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
- Returns:
- returns the lookup table to compare the total to and print as result.
-
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)
-