Documentation ¶
Index ¶
Constants ¶
View Source
const ( SpeciesHuman = "human" SpeciesElf = "elf" SpeciesDwarf = "dwarf" SpeciesHalfing = "halfing" SpeciesKender = "kender" SpeciesGnome = "gnome" )
Variables ¶
View Source
var ( // ErrWorldDoesNotExist is returned when a world does not exist ErrWorldDoesNotExist = NewResourceDoesNotExistError("world does not exist") )
Functions ¶
This section is empty.
Types ¶
type Character ¶
type Character struct {
// contains filtered or unexported fields
}
func (*Character) ID ¶
func (c *Character) ID() CharacterID
type CharacterBuilder ¶
type CharacterBuilder struct {
// contains filtered or unexported fields
}
func (*CharacterBuilder) Build ¶
func (cb *CharacterBuilder) Build() (*Character, error)
func (*CharacterBuilder) WithID ¶
func (cb *CharacterBuilder) WithID(id CharacterID) *CharacterBuilder
func (*CharacterBuilder) WithName ¶
func (cb *CharacterBuilder) WithName(name string) *CharacterBuilder
func (*CharacterBuilder) WithSpecies ¶
func (cb *CharacterBuilder) WithSpecies(species Species) *CharacterBuilder
type CharacterID ¶
type CharacterID string
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewLogicError ¶
func NewUnexpectedError ¶
func NewValidationError ¶
type NameGenerator ¶
type Party ¶
type Party struct {
// contains filtered or unexported fields
}
func (*Party) Characters ¶
type Story ¶
type Story struct {
// contains filtered or unexported fields
}
func (*Story) Characters ¶
type StoryBuilder ¶
type StoryBuilder struct {
// contains filtered or unexported fields
}
func (*StoryBuilder) Build ¶
func (sb *StoryBuilder) Build() (*Story, error)
func (*StoryBuilder) WithID ¶
func (sb *StoryBuilder) WithID(id StoryID) *StoryBuilder
func (*StoryBuilder) WithParty ¶
func (sb *StoryBuilder) WithParty(party *Party) *StoryBuilder
func (*StoryBuilder) WithWorld ¶
func (sb *StoryBuilder) WithWorld(world *World) *StoryBuilder
type StoryFactory ¶
type StoryFactory struct {
// contains filtered or unexported fields
}
func (*StoryFactory) Build ¶
func (sb *StoryFactory) Build() (*Story, error)
func (*StoryFactory) WithNameGenerator ¶
func (sb *StoryFactory) WithNameGenerator(nameGenerator NameGenerator) *StoryFactory
func (*StoryFactory) WithPartySize ¶
func (sb *StoryFactory) WithPartySize(partySize *uint8) *StoryFactory
func (*StoryFactory) WithWorld ¶
func (sb *StoryFactory) WithWorld(world *World) *StoryFactory
type World ¶
type World struct {
// contains filtered or unexported fields
}
World represents a world in the game
type WorldBuilder ¶
type WorldBuilder struct {
// contains filtered or unexported fields
}
func (*WorldBuilder) Build ¶
func (wb *WorldBuilder) Build() *World
func (*WorldBuilder) WithID ¶
func (wb *WorldBuilder) WithID(id WorldID) *WorldBuilder
func (*WorldBuilder) WithName ¶
func (wb *WorldBuilder) WithName(name string) *WorldBuilder
func (*WorldBuilder) WithSpecies ¶
func (wb *WorldBuilder) WithSpecies(species []Species) *WorldBuilder
Click to show internal directories.
Click to hide internal directories.