gacha

command module
v0.0.0-...-e366413 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 3 Imported by: 0

README

gacha

ガチャガチャ

$ go get github.com/1k-ct/gacha/dogacha
func main() {
    cou := 0
	var hit bool
	for !hit {
		hit = dogacha.Gacha(100, 1) // 1%のガチャ
		cou++
	}
	fmt.Println(cou, "回目で当たりました。")
}

ソシャゲと同じようなガチャが出来ます。
Gacha(100, 1)は、100分の1のように指定します。(1%)
0.1%のときは、Gacha(1000, 1)とします。
2%は、Gacha(100, 2)とします。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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