🎨 优化目录结构

This commit is contained in:
fumiama
2022-02-25 22:15:14 +08:00
parent 5ccf753af3
commit 0cfb2e4e06
101 changed files with 116 additions and 116 deletions

27
plugin/reborn/born.go Normal file
View File

@@ -0,0 +1,27 @@
package reborn
import (
wr "github.com/mroth/weightedrand"
)
type rate []struct {
Name string `json:"name"`
Weight float64 `json:"weight"`
}
var (
areac *wr.Chooser
gender, _ = wr.NewChooser(
wr.Choice{Item: "男孩子", Weight: 50707},
wr.Choice{Item: "女孩子", Weight: 48292},
wr.Choice{Item: "雌雄同体", Weight: 1001},
)
)
func randcoun() string {
return areac.Pick().(string)
}
func randgen() string {
return gender.Pick().(string)
}