random

package
v0.0.0-...-9b43f02 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_REASON_SIZE = 200
)

Variables

This section is empty.

Functions

func Alphabet

func Alphabet(length int) string

func Answer

func Answer() string

func Pecentage

func Pecentage(decimal int, parameter int) bool

func Question

func Question(id int64) string

func Reason

func Reason(passed bool) string

func TeamName

func TeamName() string

Types

type Score

type Score struct {
	Base      int64
	Deduction int64
	FastFail  bool
	SlowFail  bool
}

func (*Score) BaseInt

func (s *Score) BaseInt() int64

func (*Score) DeductionInt

func (s *Score) DeductionInt() int64

func (*Score) Int

func (s *Score) Int() int64

type ScoreGenerator

type ScoreGenerator struct {
	// 初期スコア
	InitialScore int64
	// 振れ幅
	Deviation int64
	// Fast Fail 確率(1/100)
	FastFailRatio int64
	// Slow Fail 確率(1/100)
	SlowFailRatio int64
	// スコア上昇係数1
	RiseCoefficient1 float64
	// スコア上昇係数2
	RiseCoefficient2 float64
	// スコア上昇指数
	RisingIndex float64
	// 遅咲き定数
	LateBloomConst int64
	// 減点確率(1/100)
	DeductionProbability int64
	// 減点率
	DeductionRatio float64
	// 減点振れ幅
	DeductionDeviation int64
}

func NewScoreGenerator

func NewScoreGenerator() *ScoreGenerator

func (*ScoreGenerator) BaseScore

func (s *ScoreGenerator) BaseScore(index int64) int64

func (*ScoreGenerator) Deduction

func (s *ScoreGenerator) Deduction(index int64, base int64) int64

func (*ScoreGenerator) Generate

func (s *ScoreGenerator) Generate(index int64) *Score

Jump to

Keyboard shortcuts

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