From c33995d256e84d85736a17bccf121c27db73d41d Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Sat, 10 Aug 2019 17:29:46 -0700 Subject: [PATCH] Actuall commit Snowball* --- actors/snowball.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actors/snowball.go b/actors/snowball.go index 8bbd9c5..c19edb5 100644 --- a/actors/snowball.go +++ b/actors/snowball.go @@ -12,7 +12,7 @@ type Snowball struct { sureness float32 } -func (sm *Snowball) Snowball(env *core.Environment, t *core.Turtle) { +func (sm *Snowball) Setup(env *core.Environment, t *core.Turtle) { num := rand.Intn(100) if num >= int(sm.Probability*100.0) { sm.color = 2 diff --git a/main.go b/main.go index 4cca805..e3a1bf0 100644 --- a/main.go +++ b/main.go @@ -103,7 +103,7 @@ func main() { g.ColorPheromone("2", [4]uint8{0xFF, 0, 0xFF, 0x00}) case "snowball": for i := 0; i < *numTurtles; i++ { - turtles[i] = core.NewTurtle(env, &actors.Slush{Probability:float32(*prob)}) + turtles[i] = core.NewTurtle(env, &actors.Snowball{Probability:float32(*prob)}) } env.InitPheromone("1") env.InitPheromone("2")