Documentation ¶
Overview ¶
Package age implements structures and routines for age calculation and reasoning.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomAge ¶
GetRandomAge returns a random age in years within the age category range
func GetRandomHeight ¶
GetRandomHeight returns a random weight given the age category and gender
func GetRandomWeight ¶
GetRandomWeight returns a random weight given the age category and gender
Types ¶
type Category ¶
type Category struct { Name string `json:"name" db:"name"` MinAge int `json:"age_min" db:"age_min"` MaxAge int `json:"age_max" db:"age_max"` MaleHeightBase int `json:"male_height_base" db:"male_height_base"` FemaleHeightBase int `json:"female_height_base" db:"female_height_base"` HeightRangeDice dice.Dice `json:"height_range_dice" db:"height_range_dice"` MaleWeightBase int `json:"male_weight_base" db:"male_weight_base"` FemaleWeightBase int `json:"female_weight_base" db:"female_weight_base"` WeightModifier int `json:"weight_modifier" db:"weight_modifier"` WeightRangeDice dice.Dice `json:"weight_range_dice" db:"weight_range_dice"` SizeCategory size.Category `json:"size_category" db:"size_category"` Commonality int `json:"commonality" db:"commonality"` }
Category is metadata about a general age
func GetCategoryByName ¶
GetCategoryByName returns the age category given a name
func GetCategoryFromAge ¶
GetCategoryFromAge returns the age category that fits the age for the given set of age categories
func GetWeightedAgeCategory ¶
GetWeightedAgeCategory returns a random age category for a race
Click to show internal directories.
Click to hide internal directories.