game

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package game holds the scoring and progression math.

Index

Constants

View Source
const (
	BadgeFirstSteps  = "First Steps"
	BadgeBirdie      = "Birdie"
	BadgeUntouchable = "Untouchable"
	BadgeGridBreaker = "Grid Breaker"
)

Badge names.

View Source
const MaxCombo = 5

Variables

This section is empty.

Functions

func ActBadge

func ActBadge(act int) string

ActBadge names the badge for completing an act's boss.

func BirdieEarned

func BirdieEarned(stars map[string]int) bool

BirdieEarned reports whether 10+ challenges have been cleared at 3 stars.

func LevelForXP

func LevelForXP(xp int) int

LevelForXP: reaching level N+1 costs 100*N XP beyond level N (thresholds 0, 100, 300, 600, 1000, ...).

func NextCombo

func NextCombo(c int) int

NextCombo raises the multiplier after a clean clear, capped at MaxCombo.

func Stars

func Stars(keystrokes, par int) int

Stars rates a clear: at or under par 3, within par+2 2, otherwise 1.

func XP

func XP(base, combo int) int

XP is the base award scaled by the active combo multiplier.

Types

This section is empty.

Jump to

Keyboard shortcuts

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