festival

package
v0.3.26 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivePibu

type ActivePibu struct {
	Berries       uint64
	Generation    uint64
	Level         uint8
	Health        uint8
	FavoriteFoods FoodCategory
	Pibu

	// Temporary (not saved)
	BerryTimer uint8
	Squish     uint8
}

func (*ActivePibu) Blend

func (p *ActivePibu) Blend(suitor *Pibu, r *rand.Rand)

func (*ActivePibu) MarshalText

func (p *ActivePibu) MarshalText() ([]byte, error)

func (*ActivePibu) Render

func (p *ActivePibu) Render(sb *sprites.Batch, x, y, z, scaleX, scaleY float32)

func (*ActivePibu) Tackle

func (p *ActivePibu) Tackle()

func (*ActivePibu) UnmarshalText

func (p *ActivePibu) UnmarshalText(b []byte) error

func (*ActivePibu) Update

func (p *ActivePibu) Update()

type FoodCategory

type FoodCategory uint8
const (
	FoodShroom FoodCategory = iota
	FoodLeaf
	FoodHoney
)

Constants for FoodCategory.

func (FoodCategory) String

func (i FoodCategory) String() string

type Game

type Game struct {
	CurrentLoc  Location
	PrevLoc     Location
	Transition  uint8
	LocState    uint8
	LocAnim     uint16
	RNG         *rand.Rand
	Aphid       ActivePibu
	History     Pibus
	Suitors     [3]Pibu
	SaveRequest uint64
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context) (*Game, error)

func (*Game) AutoSave

func (g *Game) AutoSave()

func (*Game) LoadData

func (g *Game) LoadData() error

func (*Game) MakeScreenReaderUI added in v0.3.19

func (g *Game) MakeScreenReaderUI() *screenreader.UI

func (*Game) QueueAutoSave

func (g *Game) QueueAutoSave()

func (*Game) Render

func (g *Game) Render(ctx context.Context) error

func (*Game) Resize

func (g *Game) Resize(ctx context.Context) error

func (*Game) Update

func (g *Game) Update(ctx context.Context, frameAdvance bool) (*router.PageInfo, error)

type Location

type Location uint8
const (
	LocationFarm Location = iota
	LocationArena
	LocationKut
	LocationHistory
	LocationWifeMode
	LocationInn
	LocationTutorial
)

Constants for Location.

func (Location) String

func (i Location) String() string

type Pibu

type Pibu struct {
	ID   uint8
	Body sprites.Color
	Leg  sprites.Color
}

func (*Pibu) Blend

func (p *Pibu) Blend(suitor *Pibu, r *rand.Rand)

func (*Pibu) MarshalText

func (p *Pibu) MarshalText() ([]byte, error)

func (*Pibu) Render

func (p *Pibu) Render(sb *sprites.Batch, x, y, z, scaleX, scaleY float32)

func (*Pibu) UnmarshalText

func (p *Pibu) UnmarshalText(b []byte) error

type Pibus

type Pibus []Pibu

func (*Pibus) MarshalText

func (ps *Pibus) MarshalText() ([]byte, error)

func (*Pibus) UnmarshalText

func (ps *Pibus) UnmarshalText(b []byte) error

Jump to

Keyboard shortcuts

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