typechart

package
v0.0.0-...-abeab12 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(chart *TypeChart) (string, error)

func SerializeToFile

func SerializeToFile(chart *TypeChart, filepath string) error

Types

type TypeChart

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

func Deserialize

func Deserialize(r io.Reader) (*TypeChart, error)

This function requires that the csv data is of square format it does not require that the attacking type set is equal to the defending type set

func DeserializeFile

func DeserializeFile(filepath string) (*TypeChart, error)

func NewTypeChart

func NewTypeChart() *TypeChart

func (*TypeChart) AddInteraction

func (self *TypeChart) AddInteraction(attackingType, defendingType string, effectiveness float64) *TypeChart

func (*TypeChart) AttackingTypes

func (self *TypeChart) AttackingTypes() map[string]struct{}

func (*TypeChart) DefendingTypes

func (tc *TypeChart) DefendingTypes() map[string]struct{}

func (*TypeChart) Effectiveness

func (self *TypeChart) Effectiveness(attackingType, defendingType string) (float64, bool)

func (*TypeChart) Equals

func (self *TypeChart) Equals(other *TypeChart) bool

func (*TypeChart) RemoveInteraction

func (self *TypeChart) RemoveInteraction(attackingType, defendingType string) *TypeChart

Jump to

Keyboard shortcuts

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