difficulty

package
v5.20.4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Levels holds all possible values.

View Source
var TechniqueLevels = []Level{
	Average,
	Hard,
}

TechniqueLevels holds all possible values when used with Techniques.

Functions

This section is empty.

Types

type Level

type Level byte

Level holds the difficulty level of a skill.

const (
	Easy Level = iota
	Average
	Hard
	VeryHard
	Wildcard
)

Possible values.

const LastLevel Level = Wildcard

LastLevel is the last valid value.

func ExtractLevel

func ExtractLevel(str string) Level

ExtractLevel extracts the value from a string.

func (Level) BaseRelativeLevel

func (enum Level) BaseRelativeLevel() fxp.Int

BaseRelativeLevel returns the base relative skill level at 0 points.

func (Level) EnsureValid

func (enum Level) EnsureValid() Level

EnsureValid ensures this is of a known value.

func (Level) Key

func (enum Level) Key() string

Key returns the key used in serialization.

func (Level) MarshalText

func (enum Level) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Level) String

func (enum Level) String() string

String implements fmt.Stringer.

func (*Level) UnmarshalText

func (enum *Level) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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