simvillage_simple

package
v0.0.0-...-ce97658 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gender

type Gender int

Gender represents a gender.

const (
	GenderFemale Gender = iota
	GenderMale
)

func (Gender) String

func (g Gender) String() string

String returns the string representation of the gender.

type Person

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

Person represents a person in the village.

func (*Person) Name

func (p *Person) Name() string

Name returns the full name of the person.

func (*Person) String

func (p *Person) String() string

String returns the string representation of the person.

type Village

type Village struct {
	People []*Person // All people in the village.
	// contains filtered or unexported fields
}

func New

func New() *Village

New returns a new village.

func (*Village) AddRandomPerson

func (v *Village) AddRandomPerson()

AddRandomPerson adds a random settler to the village.

func (*Village) Tick

func (v *Village) Tick()

Tick advances the simulation by one day.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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