farm

package
v0.0.0-...-31a27a5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gopher

type Gopher struct {
	Name  string        `json:"name"`
	Sleep time.Duration `json:"sleep"`
	Eat   int           `json:"eat"`
}

func (*Gopher) Live

func (g *Gopher) Live(farm *GopherFarm, radio chan string)

type GopherFarm

type GopherFarm struct {
	Gophers   []*Gopher `json:"gophers"`
	TotalFood int       `json:"totalFood"`
	sync.Mutex
	// contains filtered or unexported fields
}

func Build

func Build() *GopherFarm

func (*GopherFarm) LiveFreeOrDieHard

func (f *GopherFarm) LiveFreeOrDieHard()

func (*GopherFarm) LunchTime

func (f *GopherFarm) LunchTime(gopher *Gopher) error

func (*GopherFarm) Open

func (f *GopherFarm) Open()

Jump to

Keyboard shortcuts

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