Skip to content

Commit

Permalink
Revert "make ring prng not depend on walker count", not sure why it c…
Browse files Browse the repository at this point in the history
…hanges the walkers

This reverts commit b053f8b.
  • Loading branch information
mangofeet committed May 14, 2024
1 parent b053f8b commit 8b556ec
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions art/phungus/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,10 @@ func (drawer Entangler) Draw(ctx *canvas.Context, card *nrdb.Printing) error {
walkers = append(walkers, &wlk)
}

ringSequence := int64(9999)
// rings under the walkers
ringSequence++
sequence++
(art.TechRing{
RNG: prng.NewGenerator(seed, &ringSequence),
RNG: prng.NewGenerator(seed, &sequence),
X: float64(startX),
Y: float64(startY),
Radius: ringRadius,
Expand All @@ -325,9 +324,9 @@ func (drawer Entangler) Draw(ctx *canvas.Context, card *nrdb.Printing) error {
for i, wlk := range walkers {
wlk.Draw(ctx)
if i == (len(walkers)/4)*3 {
ringSequence++
sequence++
(art.TechRing{
RNG: prng.NewGenerator(seed, &ringSequence),
RNG: prng.NewGenerator(seed, &sequence),
X: float64(startX),
Y: float64(startY),
Radius: ringRadius,
Expand Down Expand Up @@ -355,9 +354,9 @@ func (drawer Entangler) Draw(ctx *canvas.Context, card *nrdb.Printing) error {
}

// rings over the walkers
ringSequence++
sequence++
(art.TechRing{
RNG: prng.NewGenerator(seed, &ringSequence),
RNG: prng.NewGenerator(seed, &sequence),
X: float64(startX),
Y: float64(startY),
Radius: ringRadius,
Expand All @@ -377,9 +376,9 @@ func (drawer Entangler) Draw(ctx *canvas.Context, card *nrdb.Printing) error {
OverlayColor: &canvas.Transparent,
}).Draw(ctx, card)

ringSequence++
sequence++
(art.TechRing{
RNG: prng.NewGenerator(seed, &ringSequence),
RNG: prng.NewGenerator(seed, &sequence),
X: float64(startX),
Y: float64(startY),
Radius: canvasWidth * 0.5,
Expand Down

0 comments on commit 8b556ec

Please sign in to comment.