lol

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Champion

type Champion struct {
	ID      string  `yaml:"id"`
	Name    string  `yaml:"name"`
	Title   string  `yaml:"title"`
	Tags    string  `yaml:"tags"`
	Passive Passive `yaml:"passive"`
	Stats   Stats   `yaml:"stats"`
	Spells  []Spell `yaml:"spells"`
}

Champion LoL champion data struct

type FightTactics

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

func (*FightTactics) Fight

func (f *FightTactics) Fight(champion1, champion2 Champion) TacticsSol

Fight Champion1 vs Champion2 health point

func (*FightTactics) ReadChampion

func (f *FightTactics) ReadChampion(filePath string) (champion Champion, err error)

func (*FightTactics) WriteChampion

func (f *FightTactics) WriteChampion(champion Champion, filePath string) error

type Passive

type Passive struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
}

type Spell

type Spell struct {
	ID       string    `yaml:"id"`
	Name     string    `yaml:"name"`
	MaxRank  int       `yaml:"max_rank"`
	Damage   []float64 `yaml:"damage"`
	Cooldown []float64 `yaml:"cooldown"`
	Cast     float64   `yaml:"cast"`
}

type Stats

type Stats struct {
	HealthPoints float64 `yaml:"health_points"`
	AttackDamage float64 `yaml:"attack_damage"`
	AttackSpeed  float64 `yaml:"attack_speed"`
}

type Tactics

type Tactics interface {
	ReadChampion(filePath string) (champion Champion, err error)
	WriteChampion(champion Champion, filePath string) error
	Fight(champion1, champion2 Champion) TacticsSol
}

func NewTactics

func NewTactics(log logger.Logger) Tactics

type TacticsSol

type TacticsSol struct {
	Benchmark     float64 // time (in seconds) taken to slay the enemy
	RoundOfSpells []Spell
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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