merchant

package
v0.0.0-...-a30bc99 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package merchant allows for creation of travelling merchants and their wares

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Merchant

type Merchant struct {
	Character character.Character
	Goods     []goods.TradeGood
}

Merchant is a merchant

func Generate

func Generate(originTown town.Town) (Merchant, error)

Generate returns a random merchant

func Random

func Random() (Merchant, error)

Random returns a complete random merchant

func (Merchant) Simplify

func (merchant Merchant) Simplify() (SimplifiedMerchant, error)

Simplify simplifies a merchant

type SimplifiedMerchant

type SimplifiedMerchant struct {
	Character character.SimplifiedCharacter `json:"character"`
	Goods     []goods.TradeGood             `json:"goods"`
}

SimplifiedMerchant is a simplified version of merchant for display

func RandomSimplified

func RandomSimplified() (SimplifiedMerchant, error)

RandomSimplified returns a random simplified merchant

Jump to

Keyboard shortcuts

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