daily

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mode

func Mode(date time.Time) (game.SeededSpawner, string, string)

Mode selects the daily mode from the eligible pool using rendezvous hashing (highest random weight). Each entry is scored by hashing the date together with its (GameType, Mode) pair; the highest score wins.

This is resilient to changes in the pool: adding or removing an entry only affects dates where the changed entry would have been the winner.

func Name

func Name(date time.Time) string

Name generates the daily puzzle name in the format: "Daily Feb 14 26 - amber-falcon"

Name uses its own sub-RNG derived from the date so that changes to the namegen word lists cannot affect mode selection or puzzle generation.

func RNG

func RNG(date time.Time) *rand.Rand

RNG creates a deterministic RNG seeded from the given date.

func Seed

func Seed(date time.Time) uint64

Seed returns a deterministic uint64 seed derived from the date.

Types

type Entry

type Entry = schedule.Entry

Jump to

Keyboard shortcuts

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