Skip to content

Re-consider class names / structure / functionality #306

@GreenImp

Description

@GreenImp

As part of the re-write, we should look at all of the existing classes and see if they're all necessary and what can be improved.
There are several classes that have very similar names, which could be confusing;

  • DiceRoller and DiceRoll
  • RollResults and RollResult
  • etc.

Other things to consider are things like;

  • Currently the dice classes are responsible for rolling as well. It might be good to change this so that they just store the info (sides, qty, modifiers etc.), and have a new "Roll Engine" which does the rolling.
  • The grammar parser currently converts the notation directly to the various objects. It might be worthwhile creating an intermediary AST of plain objects. This could then allow us greater flexibility with passing them into the final output, and hopefully enabling us to do inline / recursive rolling (see Inline rolls #206).

This list is not exhaustive, but is a good starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions