model

package
v0.0.0-...-79a5fa3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action[Input any, Output any] interface {
	Execute(Input) (Output, error)
}

type ActionFunc

type ActionFunc[Input any, Output any] func(Input) (Output, error)

func (ActionFunc[Input, Output]) Execute

func (f ActionFunc[Input, Output]) Execute(input Input) (Output, error)

type DiceService

type DiceService struct {
	// contains filtered or unexported fields
}

func NewDiceService

func NewDiceService(r RandGenerator) DiceService

func (DiceService) RollD10

func (ds DiceService) RollD10() int

func (DiceService) RollD100

func (ds DiceService) RollD100() int

func (DiceService) RollD6

func (ds DiceService) RollD6() int

func (DiceService) RollIronsworn

func (ds DiceService) RollIronsworn() (result struct {
	D6  int
	D10 [2]int
})

type NoYes

type NoYes bool

func ResolveOdds

func ResolveOdds(n int, chosenOdds string) NoYes

func (NoYes) String

func (n NoYes) String() string

type Odds

type Odds int

Odds represents the odds of a roll. It does not participate in calculations. It can have only one of the valid values.

const (
	AlmostCertain Odds = 11
	Likely        Odds = 26
	FiftyFifty    Odds = 51
	Unlikely      Odds = 76
	SmallChance   Odds = 91
)

func (Odds) String

func (o Odds) String() string

type OraclesService

type OraclesService struct {
	// contains filtered or unexported fields
}

func NewOraclesService

func NewOraclesService(dice DiceService) OraclesService

func (OraclesService) ActionTheme

func (os OraclesService) ActionTheme() (result struct{ Action, Theme string })

func (OraclesService) AspectFocus

func (os OraclesService) AspectFocus() (result struct{ Aspect, Focus string })

func (OraclesService) ChallengeRank

func (os OraclesService) ChallengeRank() string

func (OraclesService) CombatAction

func (os OraclesService) CombatAction() string

func (OraclesService) MajorPlotTwist

func (os OraclesService) MajorPlotTwist() string

func (OraclesService) MakeNPC

func (os OraclesService) MakeNPC() (result struct{ Role, Goal, Descriptor, Disposition string })

func (OraclesService) MysticBacklash

func (os OraclesService) MysticBacklash() string

type Rand

type Rand struct {
	// contains filtered or unexported fields
}

func NewCustomRand

func NewCustomRand(rand *rand.Rand) *Rand

func NewDefaultRand

func NewDefaultRand() *Rand

func (*Rand) Generate

func (r *Rand) Generate(n int) int

type RandGenerator

type RandGenerator interface {
	Generate(n int) int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL