populating the swamp

When Mood Music
2012-04-13 13:57:00 awake the ping of incoming emails

More farting about later, I now have a Swamp class which has a collection to hold creatures. I can add an ogre to a random location, then decide (and for now, report) whether an enemy is to be added, then do any necessary enemy-population augmentation. (The enemies always arrive at (0,0)). I also have a method to report which creatures are currently in the swamp and where they are.

So:

  1. Add an ogre
  2. Will an enemy arrive?
  3. Yes – here it is!

On the next go:

  1. Add an ogre
  2. Will an enemy arrive?
  3. No – poor ogre is lonely (but he likes it that way).

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.