cleaned up comments

This commit is contained in:
Grimsace
2026-02-18 15:26:29 -06:00
parent 710c05f716
commit 266b93639c
7 changed files with 91 additions and 278 deletions
+3 -5
View File
@@ -2,21 +2,19 @@ package main
import "math/rand"
// SeedProvider is a simple struct that provides a stream of random seeds
// from a single initial seed. This ensures that the entire map generation
// process is deterministic if the same initial seed is used.
// SeedProvider provides a stream of random seeds from a single initial seed
type SeedProvider struct {
rand *rand.Rand
}
// NewSeedProvider creates a new SeedProvider with the given initial seed.
// NewSeedProvider creates a new SeedProvider with the given initial seed
func NewSeedProvider(seed int64) *SeedProvider {
return &SeedProvider{
rand: rand.New(rand.NewSource(seed)),
}
}
// Next returns the next random seed in the sequence.
// Next returns the next random seed in the sequence
func (sp *SeedProvider) Next() int64 {
return sp.rand.Int63()
}