Documentation ¶
Index ¶
- Constants
- type Environment
- type Goid
- func (g *Goid) AdjustEdge(width, height float64)
- func (g *Goid) Align(goids []Goid)
- func (g *Goid) Cohesive(goids []Goid)
- func (g *Goid) Flee(t Vector)
- func (g *Goid) Flock(goids []Goid)
- func (g Goid) IsInsight(g2 Goid) bool
- func (g *Goid) Seek(t Vector)
- func (g *Goid) Separate(goids []Goid)
- func (g *Goid) Update(width, height float64)
- type ImageType
- type Vector
Constants ¶
View Source
const GopherSize = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct { SideImage image.Image PinkImage image.Image // contains filtered or unexported fields }
func CreateEnv ¶
func CreateEnv(width, height float64, n int, maxSpeed, maxForce float64, sight float64) Environment
func (Environment) Goids ¶
func (e Environment) Goids() []Goid
func (Environment) GoidsNum ¶
func (e Environment) GoidsNum() int
func (Environment) Height ¶
func (e Environment) Height() float64
func (Environment) Render ¶
func (e Environment) Render() string
func (Environment) RenderImage ¶
func (e Environment) RenderImage() image.Image
func (*Environment) Update ¶
func (e *Environment) Update()
func (Environment) Width ¶
func (e Environment) Width() float64
type Goid ¶
type Goid struct {
// contains filtered or unexported fields
}
func (*Goid) AdjustEdge ¶
type Vector ¶
func CreateVector ¶
Click to show internal directories.
Click to hide internal directories.