mopertest

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ROUND = 10
	TOTAL = -1
)

Functions

func Clear

func Clear(ctx context.Context) error

func Seed

func Seed(ctx context.Context, n int) error

Seed create 1 hero has 1 damage, 2 heroes have 2 damages,... until n (n == 10)

Types

type Hero

type Hero struct {
	mocom.ObjectID `bson:",inline"`
	WeaponID       interface{} `bson:"weaponId"`
	Name           string      `bson:"name"`
	Damage         int         `bson:"damage"`
	SkillIds       []int       `bson:"skillIds"`
	Omit           bool        `bson:"omit,omitempty"`
}

hero

func (Hero) CollName

func (Hero) CollName() string

type Weapon

type Weapon struct {
	mocom.ID `bson:",inline"`
	Type     int `json:"type" bson:"type"`
	Damage   int `json:"damage" bson:"damage"`
}

weapon

func (Weapon) CollName

func (Weapon) CollName() string

Jump to

Keyboard shortcuts

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