mccoyst / min-game

Automatically exported from code.google.com/p/min-game
MIT License
2 stars 1 forks source link

Move boid code into herbivores #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Now that all herbivores are the same type, there is no reason to abstract the 
boid code in its own interface.  I propose that we implement the boid code 
directly on the herbivore type.  This removes the need for the ai package, and 
simplifies the code by removing some types (Boids and Boid).  Finally, if we 
ever decide to cache things like the neighbors of a boid, then the cached 
neighbors can be stored directly in the herbivore struct.  It would also 
simplify removing dead herbivores because we won't need to create an interface 
for removing dead boids from some cache in the ai package.

Original issue reported on code.google.com by burns.ethan@gmail.com on 30 Dec 2012 at 3:23

GoogleCodeExporter commented 9 years ago
Steve, mark the issue accepted if you agree.

Original comment by burns.ethan@gmail.com on 30 Dec 2012 at 3:23

GoogleCodeExporter commented 9 years ago
This would also allow us to more easily implement different states.  For 
example, we could have wandering and fleeing.  The max velocity while fleeing 
can be greater than while wandering.

Original comment by burns.ethan@gmail.com on 30 Dec 2012 at 3:53

GoogleCodeExporter commented 9 years ago
I think we should keep the ticket, but wait to act on this until we've added a 
few more AIs, like carnivores and gun-toting killbots.

Original comment by Mcco...@gmail.com on 30 Dec 2012 at 9:33

GoogleCodeExporter commented 9 years ago
We agreed to leave the ticket, but wait to see if we really want to make the 
change.

Original comment by burns.ethan@gmail.com on 2 Feb 2013 at 12:16