class StarWarsDice

A class for representing the game dice from Star Wars: Edge of the Empire,

Star Wars: Age of Rebellion, Star Wars: Force and Destiny.  Mostly here as
an example of how to create a custom dice bag.

@note no claim is made for the name StarWarsDice

Constants

DATA_FILE_NAME

yaml file containing dice definitions

DEFAULT_READERS

The normal reader order for StarWarsDice. First split the face names using

'_', then cancel opposing faces, finally return as a hash
OPPOSING

opposite facing to be used by the reader CancelOpposing

Public Class Methods

get() click to toggle source

load and return a bag of StarWarsDice

# File lib/star_wars_dice.rb, line 37
def self.get
  hash = YAML.load_file(DATA_FILE_NAME)
  self.new(name: 'Star Wars Dice', dice: hash)
end