levels

package
v0.0.0-...-1f9a799 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const LEVEL_EXP_BASE = 200
View Source
const LEVEL_EXP_MULTIPLIER = 100
View Source
const ONLINE_MULTIPLIER = 1.1
View Source
const POINT_BASE = 1

Variables

View Source
var Levels []entities.Level

Functions

func ApplyPoints

func ApplyPoints(user *entities.User, points int) (bool, bool)

Applies points to the user. Returns: (bool) leveledUp, (bool) ok

func CalculatePoints

func CalculatePoints(result *entities.GameResult, players int) int

Calculates how many points should a user get for the game result (Words * PB) * wpmMultiplier * Accuracy

func CalculateThresholdForLevel

func CalculateThresholdForLevel(level int) int

func GetLevelName

func GetLevelName(level int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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