model

package
v0.0.0-...-c01338d Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlayerStats

type PlayerStats struct {
	Points    uint64
	Bots      uint64
	Lurkers   uint64
	Viewers   uint64
	Followers uint64
	Tier1Subs uint64
	Tier2Subs uint64
	Tier3Subs uint64
}

type PlayerStatsV2

type PlayerStatsV2 struct {
	Points uint64
	Items  []PurchasedItem
}

func (PlayerStatsV2) GetItem

func (stats PlayerStatsV2) GetItem(index int) PurchasedItem

type PurchasedItem

type PurchasedItem struct {
	Quantity uint64
	Upgrades []bool
}

func (PurchasedItem) CalculateItemPerSecond

func (item PurchasedItem) CalculateItemPerSecond(itemDetails item.ItemType) uint64

func (PurchasedItem) CalculateNextCost

func (item PurchasedItem) CalculateNextCost(itemDetails item.ItemType) uint64

func (PurchasedItem) IsUpgraded

func (item PurchasedItem) IsUpgraded(index int) bool

type User

type User struct {
	Ident     string
	PublicKey []byte

	StatsV01 PlayerStats
	StatsV02 PlayerStatsV2
}

func (User) Migrate

func (u User) Migrate() User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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