config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

func New

func New(getter kv.Getter) Config

type Level

type Level struct {
	Level     int  `fig:"lvl,required"`
	Threshold int  `fig:"threshold,required"`
	Referrals int  `fig:"referrals"`
	Infinity  bool `fig:"infinity"`
}

type Levels

type Levels map[int]Level

func (Levels) LvlUp

func (l Levels) LvlUp(currentLevel int, totalAmount int64) (refCoundToAdd int, newLevel int)

LvlUp Calculates new lvl. New lvl always greater then current level

func (Levels) MinLvl

func (l Levels) MinLvl() int

Jump to

Keyboard shortcuts

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