npcs

package
v0.0.0-...-cdffa6e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	X float64
	Y float64
	Z float64
}

func (Location) EnclideanDistance

func (loc Location) EnclideanDistance(target Location) float64

func (Location) String

func (loc Location) String() string

type NonPlayerCharacter

type NonPlayerCharacter struct {
	Name  string
	Speed int
	HP    int
	Power Power
	Loc   Location
}

func (NonPlayerCharacter) DistanceTo

func (npc NonPlayerCharacter) DistanceTo(target NonPlayerCharacter) float64

func (NonPlayerCharacter) String

func (npc NonPlayerCharacter) String() string

type Power

type Power struct {
	Attack  int
	Defence int
}

Jump to

Keyboard shortcuts

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